Manage Third-Party Tracking Tools in Google Tag Manager

You can use Google Tag Manager (GTM) to manage third-party tracking tools and custom data integrations on your own. As a result, this tool gives you the freedom to trigger your tracking codes directly on the Cleverbridge checkout pages; no need to set up trackings in the Cleverbridge Commerce Assistant.

To integrate the Google Tag Manager with your Cleverbridge checkout pages, do the following:

1. Sign up for a GTM account

For more information, go to https://tagmanager.google.com/.

2. Enable the Data Layer required by GTM

Ask Cleverbridge to enable the Data Layer required by GTM on your checkout pages. To do so, contact the Client Experience team.

3. Set up your GTM tags

Set up your GTM tags using the Cleverbridge data Layer and Events. Learn more about the Cleverbridge dataLayer in the following sections, as well as the enhanced ecommerce events you can consume in your GTM tags:

About the Cleverbridge data Layer

The Cleverbridge dataLayer is added to every page of your checkout process when GTM is enabled. This dataLayer contains information about the cart, session, user, and transaction, all of which you can dynamically insert in your GTM tags. The dataLayer is activated upon every page load, but it can also contain additional information related to certain events. For more information, see .

Information available in the Data Layer on page load

The following information is available upon every page load of your checkout process if GTM is enabled for your account. The values are inserted dynamically, based on the current user session.

dataLayer = [{
  'transactionId': '51142586',  								// the purchaseClosed An order made by a customer and the records associated with it. reference ID
  'transactionAffiliation': 'cleverbridge',					    // source of the purchase
  'transactionTotal': 53.95,									// the total of the transaction revenue
  'transactionTax': 8.61,										// the VAT of the transaction
  'transactionShipping': 0, 									// the shipping cost of the transaction
  'transactionCurrency':  'EUR', 								// the transaction currency ID
  'transactionProducts': [{
    'id' : '2417',												// the Cleverbridge product ID
    'sku' : 'my internal sku',									// your internal SKU
    'category' : 'Software', 									// the product category
    'name' : 'Anti-Malware+%5b2+Years%5d',  					// the product name
    'price' : '53.95',  										// the product price, gross or net
    'quantity' : '1' 											// the product item quantity
  }],
  'customerCurrency':  'EUR',									// the transaction currency ID
  'languageCountry': 'en-DE',									// the customerClosed An individual or business purchasing your product or service by placing an order through Cleverbridge. The customer is the end user of this product, as they are not allowed to resell the purchased  products or services. ​
A customer is unique per client. If a customer purchases products or services from two different clients, there are 2 separate records of said customer.​’s locale
  'coupons' : 'OFF50',										    // coupon code (optional)
  'cleverbridgePage' : 'confirmation.successInstantDelivery',	// page name and detail
  'paymentStatus': 'paid ',									    // the status of the purchase (*)
  'random' : 'rmgP9A3fUMNxANgeuHi8',							// a unique hash per session
  'configParameterName' : 'default',							// the value of cfg= parameter
  'paymentType' : 'CCA_VIS ',									// the payment typeClosed Consolidates multiple payment methods into groups by the type of payment the customer uses, for example, Credit Card as a payment type that encompasses Visa Credit Card, Master Card Credit, Amex, in short: all credit cards. (*)
  'x-parameterClosed The x-parameter is a variable appended to a URL that allows grouping and tracking orders for later reporting purposes. It also enables you to pass through data that you want to capture in the order process. X-parameters can also be used to control design elements based on the value of the x-parameter.' : [{											// an array of custom x-parameters
    'x-parameter' : 'customValue'
  }]
}];

* paymentStatus — Possible values are paid, waiting for paymentClosed Exchange of money for goods and services in an acceptable amount to the customer where the payment amount has been agreed upon in advance. The customer can only pay with an accepted payment method. Each payment has an individual payment cost., quote, or test purchase.

* paymentType — For possible values, see Payment Result.

Note

Some fields may have empty values if dynamic values are not available on the current page. For example, a value for transactionId would not be available on the checkout page or review pageClosed The review page contains summary information about the purchase a customer is about to make. before the purchase is completed.

How to read the information in the Data Layer in GTM

To access the dataLayer values in your GTM tags, you must create a new user-defined variable in your GTM account for each field you want to track. For more information, see User-defined variables.

Important

When creating a new variable, be sure to select type Data Layer Variable in the Variable Configuration area.

Example

The following user-defined variable is called cleverbridgeTransactionId. If the variable is used, the user is able track the value of transactionId in the dataLayer.

To track the variable in GTM tags, the user inserts {{cleverbridgeTransactionId}}.

Events and the Cleverbridge data Layer

In certain situations, events containing additional data are added to the dataLayer. You can use these event occurrences as GTM tag triggers. Currently, the following events are available for GTM integration:

How to trigger GTM tags with events

To only trigger a tag when a certain ecommerce event occurs, create a new GTM trigger with the type Custom Event. Under Event Name, add one of the events listed above. For more information, see Custom event trigger.

Example

The following is an example of a GTM trigger that only activates when a customer places a purchase.

If you have specific questions related to the Cleverbridge Google Tag Manager implementation, or if you want to implement a certain use case, contact our Tracking team.