Google Tag Manager

Google Tag Manager is a tag management system (TMS) that allows you to quickly and easily update measurement codes and related code fragments collectively known as tags on your website. Once the small segment of Tag Manager code has been added to your website, you can safely and easily deploy analytics and measurement tag configurations from a web-based user interface.

Supporting Information

The Google Tag Manager video in this article, can be used to provide additional clarity to this article.

Why Google Tag Manager?

Google Tag Manager allows website admins or marketing firms to manage tracking code for multiple analytic services under a single interface. This both allows customers an easy-to-use interface and his highly customizable based on your website’s tracking needs.

What Tags does CIMcloud support?

CIMcloud (version >= 2.1) provides a robust set of Google Tag Manager dataLayer variables and events that can be used within Google Tag Manager.

Global Data 

The following data layer data variables are set and pushed to Google Tag Manager on every page. These variables can be used inside of Google Tag Manager regardless of the event or page the user views. 

Variable Value Notes
CIMpageName Page name user is viewing.  If viewing a static page the page name associated with the page type will be returned. Example: static product page ‘coffee.asp’ will return pc_product_detail.asp  
CIMorderFrontURL Domain user is viewing the site.
CIMcustomerUsername Customer.username  If a user is not logged in, the field will be blank. 
CIMaccountKey Customer account key If a user is not logged in, the field will be blank. 
CIMcustomerKey Customer customer key  If a user is not logged in, the field will be blank. 
CIMsessionOrderKey Order key associated with users session Order key can be returned when the user is not logged into the website. 
CIMsessionIP Session IP address IP address of the user viewing the site. The value will be populated if the user is or is not logged into the site. 

Event Data

The following events trigger a dataLayer push to Google Tag Manager. These dataLayer variables should only be used in Google Tag Manager when the event is fired. If you try to access these dataLayer variables outside of the event these variables will not be populated.

Event Name  Trigger  Pages Applied  Example Payload
EEaddToCart User adds item to cart  Category + Product

{
   "event":"EEaddToCart",
   "ecommerce":{
      "currencyCode":"USD",
      "add":{
         "products":[
            {
               "name":"Coffee Grinder Small",
               "id":"2510F",
               "price":15.99,
               "quantity":1
            }
         ]
      }
   }
}
EEcheckout Viewing a page in the checkout process Showcart, Account, Payment  


{
  event: 'EEcheckout',
  ecommerce: {checkout: {actionField: {step: 1, option: 'Showcart'}}}
}

EEproductClick User clicks a product  Category 

{
    'event': 'EEproductClick',
      'ecommerce': {
        'click': {
          'products': [{name: 'Coffee Grinder Small', id: '2510F', price: 15.99,'list': 'Search Results'
          }]
        }
      }
    }

EEproductImpression User views a product  Category 


{
 event: 'EEproductImpression',
 ecommerce: {
   currencyCode: 'USD',
   impressions: [
     {name: 'Coffee Grinder X-Small', id: '5523F', price: '16.99', list: 'Search Results', pos: 0},
     {name: 'Coffee Grinder Small', id: '5524F', price: '14.99', list: 'Search Results', pos: 1},
     {name: 'Coffee Grinder Large', id: '5525F', price: '14.99', list: 'Search Results', pos: 2},
   ]
 }
}
EEproductView User views product detail page Product

{
  event: 'EEproductView',
  ecommerce: {
    currencyCode: 'USD',
    detail: {
      actionField: {list: 'Product Page'},
      products: [
        {
          id: '4520',
          name: 'Coffee Grinder Small',
          price: '29.99',
          category: 'Coffee Grinder'
        }
      ]
    }
  }
}

EEtransaction User completes order Payment ***On the latest CIMcloud platform confirmation and payment use the same page. 

{
   "event":"EEtransaction",
   "ecommerce":{
      "purchase":{
         "actionField":{
            "Id":"12346",
            "affiliation":"Coffee Co",
            "Revenue":"100",
            "Tax":"1",
            "Shipping":"2.69",
            "coupon":"10off"
         },
         "products":[
            {
               "id":"1234",
               "sku":"1234",
               "name":"grinder",
               "category":"mugs",
               "price":"10",
               "quantity":"10"
            }
         ]
      }
   }
}

How to Set Up?

  • Create Google Tag Manager account
    • https://tagmanager.google.com
  • Find Google Tag Manager container ID
    • Login >  Select Tag Manager Account > Admin > Container ID will display to the right of container name
      •  Google Tag Manager Container ID
  • Add Google Tag Manager to Settings workplace
    • {{sitename}}.mycimproduction.com
    • Settings workspace link
      • Gear icon in the left most menu
    • System-Wide Settings > Customers Sites > Select site to add Google Tag Manager > Edit
    • At the bottom of General Section there is a question for “Use Google Tag Manager”.
    • Set Use Google Tag Manager to “Yes” and add Google Tag Manager container ID to input “Google Tag Manager ID”

Setup Google Analytics Enhanced Ecommerce Tracking with Tag Manager

  • Pre-Req’s
    • Document Google Analytics ID
    • Enable Enhanced Ecommerce option inside of Google Analytics.
      • If this is not completed, the following configuration will pass data to Google Analytics, but the format will not be in a format that Google can interpret so no data will be received.
    • Download CIMcloud’s Google Tag Manager Container
    • Determine what is already running inside of Google Tag Manager account. If your Google Tag Manager account is already running google analytics e-commerce tracking through the website, this setup may result in duplicate tracking data or break the Google Tag Manager setup.
  • To-Do
    • Login to Google Tag Manager account
    • Optional: Create a new workspace named “Google Ecommerce Tracking”.
      • Creating a workspace provides simple organization inside of Google Tag Manager. Not doing this will have no effect on the final result.
    • Go to Admin > Import Container
    • Make the following selections on the Import Container page
      • Choose container file select:: Use file CIMcloud’s Google Tag Manager Container
      • Choose workspace :: If created workspace above select “existing” if not select “new”
      • Choose an import option :: Most often select “Merge”, the only reason to select “Overwrite” is if CIMcloud releases a new container then “Overwrite”
    • Submit Import Container Page
    • Update the Google Analytics Variable to your Google Analytics ID
    • Publish changes

Was this article helpful?

Related Articles