Skip to main content

Use Google Tag Manager

The Cleverbridge Google Tag Manager (GTM) integration is the recommended way to manage tracking on your checkout pages. GTM gives you a single, centralized container and controller for all tags, so you can launch, test, and refine third-party tracking without code changes or Commerce Assistant (CA) setup.

note

Google Tag Manager works on both Checkout 1.0 and Checkout 2.0 pages. The list of supported events and tag templates may differ between versions; see the sections below for details.

Set up the integration

To integrate GTM with your Cleverbridge checkout pages:

  1. Create a GTM account. For more information, see Google Tag Manager.
  2. Contact the Client Experience team to enable the GTM data layer on your checkout pages.
  3. Set up your GTM tags and triggers using Cleverbridge data layer values and events.

How events work

To make the concept easier to follow, the flow below shows a simplified version of how GTM interacts with the Cleverbridge dataLayer.

  1. When the GTM integration is enabled, a dedicated data layer is created on every Checkout page. This layer acts as a container for data fields that can be used by GTM.
  2. When an events happens on a Checkout page, a new data object is added to this layer.
  3. GTM reads this object and resolves the Data Layer variables to their most recent values.
  4. You can use these values to create rules that - provide values for other tags, trigger specific events, or fire tags.
  5. When a tag fires, it reads the current data and sends it to the chosen destination (e.g., GA4, Google Ads, Meta Pixel).
note

Previous entries stay in the array until the page reloads.

Understanding the data fields

Data fields are the fields that represent information available at the Checkout page in Cleverbridge. When an event happens, these fields and their current values are saved in the data layer.

These include such details as:

  • Transaction details, including the transaction id, transaction currency and total transaction amount.
  • Details of the products in the cart, such their names and SKUs, categories, prices and amounts.
  • Specific checkout screen, at which the data is passed, and the event that has caused the system to collect the data.
  • Other information, including the sessions id, language, applied coupons, and x-parameters passed through checkout.

Data Layer variables

User-defined variables in GTM act like labels that tell GTM which pieces of information to pick from the data layer. Think of the data layer as a shelf full of boxes, each box holding a data field. By creating the variables, you’re essentially telling GTM “I want the value inside this box whenever it appears.” These values are than used to populate tag fields or define trigger rules (for instance, “fire when paymentStatus = paid”).

You can find detailed guidelines at Google’s document on user-defined variables. The guide covers all user-defined variables. For our purposes, you need to set the Type to Data Layer Variable.

Example

There is a value of the field called transactionId in the Cleverbridge data layer. We want to create a GTM variable cleverbridgeTransactionId that will reference the transactionId value from the Cleverbridge data Layer. In the Variable configuration, it is important to set Type to Data Layer Variable, and use the exact name of the field in Cleverbridge as a Data Layer Variable Name.
Variable Configuration

You can then reference it in tags and triggers using the variable name, {{cleverbridgeTransactionId}}.

Cleverbridge events

Cleverbridge supports a comprehensive set of events that span the entire checkout flow — from the moment a customer opens the checkout page to the successful completion of a purchase. These events make it possible to capture every key interaction and send accurate, structured data to your analytics, advertising, attribution, or marketing automation tools. The list of events depends on the checkout model you’re using.

EventTriggered when
begin_checkoutCustomer opens Checkout 2.0 for the first time.
page_viewCustomer views any step in the checkout flow. Fires on initial load and each step change.
add_to_cartCustomer adds a recommended product to the cart. The event fires immediately when the customer clicks the Add button, before the page reloads. Also emits select_promotion for the chosen recommendation.
select_promotionA recommendation/promotion is selected and added to the cart. Emitted together with add_to_cart.
remove_from_cartCustomer removes a line item from the cart. The event fires immediately when the customer clicks the Remove button, before the page reloads.
add_payment_infoCustomer completes all required payment fields, or selects a payment method with no input fields (for example, wire transfer). Fires as soon as the method selection or entered data becomes valid.
purchaseCustomer clicks Buy now and the system successfully generates purchase ID with no validation errors. Fires exactly once per unique purchase ID.

Data fields and examples for each event

Each event pushes a dedicated data object to the dataLayer. These typically include an event name and additional parameters describing the context, such as product details, transaction values, or payment information.

The exact objects and available fields depend on the checkout model you’re using:

begin_checkout fields

FieldTypeDescription
eventstringEvent name. Always "begin_checkout".
ecommerce.currencystringISO 4217 currency code selected by the customer.
ecommerce.valuenumberOrder total (gross) at the time of the event.
ecommerce.itemsarrayArray of items currently in the cart.

ecommerce.items fields

FieldTypeDescription
item_idstringProduct ID.
item_namestringProduct display name.
affiliationstringAlways "cleverbridge".
couponstringApplied coupon code, if any.
discountnumberItem-level discount (gross).
item_brandstringClient account name.
item_categorystringProduct category.
item_variantstringInternal product name or variant.
pricenumberDiscounted item price (gross).
quantitynumberQuantity of the item.
Example
 dataLayer.push({
event: "begin_checkout",
ecommerce: {
currency: "USD",
value: 129.99,
items: [
{
item_id: "12345",
item_name: "Pro Suite Annual",
affiliation: "cleverbridge",
coupon: "FALL20",
discount: 20.00,
item_brand: "Acme Corp",
item_category: "Software",
item_variant: "Pro Suite",
price: 129.99,
quantity: 1
}
]
}
});

A customer starts checkout, so we push a begin_checkout event to the data layer with the current cart details: currency is USD, the order total is 129.99, and the cart contains one item—Pro Suite Annual (ID 12345) from Acme Corp. The FALL20 coupon applies a 20.00 discount, and the item price shown is the discounted gross price. GTM can use this event to trigger analytics, conversion, and remarketing tags for the start of the checkout.

GTM can use this event to trigger analytics, conversion, and remarketing tags for the start of the checkout.*

page_view fields

FieldTypeDescription
eventstringEvent name. Always "page_view".
subscription_typestringSubscription type (for example, "none", "auto_renew", or another configured value).
checkout_typestringCheckout context (for example, "new" or "upgrade").
affiliationstringAlways "cleverbridge".
languagestringSelected language (ISO code).
transaction_intervalnumberSubscription interval in months; 0 for one-time purchases.
currencystringSelected currency (ISO 4217).
cart_idstringValue of the &cart parameter, if present.
entry_urlstringCustomer’s checkout entry URL.
page_namestringLogical step identifier (for example, funnelName.templateSteps.progressStep).
session_idstringCheckout session ID.
x-parametersarrayArray of custom key–value pairs provided via x-parameters.
countrystringDelivery country (ISO code).
Example
js
dataLayer.push({
event: "page_view",
subscription_type: "none",
checkout_type: "new",
affiliation: "cleverbridge",
language: "en",
transaction_interval: 0,
currency: "USD",
cart_id: "CART-9A7B",
entry_url: "https://checkout.example.com/?pid=12345",
page_name: "checkout.step.shipping",
session_id: "sess_abc123",
"x-parameters": [{ partner: "affiliate42" }, { campaign: "fall_launch" }],
country: "US"
});

A customer views the shipping step of Checkout 2.0, so we push a page_view event to the data layer with contextual information about this session: the checkout type is new, the selected language is English, and the transaction is a one-time purchase (interval 0). The checkout is in USD, with the cart ID CART-9A7B and session ID sess_abc123. Additional parameters identify the affiliate partner (affiliate42) and campaign (fall_launch).

GTM can use this event to record funnel progression, measure engagement by step, and attribute the session to the correct campaign and partner.

add_to_cart fields

FieldTypeDescription
eventstringEvent name. Always "add_to_cart".
ecommerce.currencystringISO 4217 currency code.
ecommerce.valuenumberOrder total (gross) after the add.
ecommerce.itemsarrayArray with the added item (and optionally cart context).

commerce.items fields

FieldTypeDescription
item_idstringProduct ID added from recommendations.
item_namestringProduct display name.
affiliationstringAlways "cleverbridge".
discountnumberItem-level discount (gross).
item_brandstringClient account name.
item_categorystringProduct category.
item_variantstringInternal product name or variant.
pricenumberDiscounted item price (gross).
quantitynumberQuantity added.
indexnumberRecommendation array index (position in the recommendation list).
Example
js
dataLayer.push({
event: "add_to_cart",
ecommerce: {
currency: "EUR",
value: 59.99,
items: [
{
item_id: "67890",
item_name: "Add-on Storage 100GB",
affiliation: "cleverbridge",
discount: 0,
item_brand: "Acme Corp",
item_category: "Add-on",
item_variant: "Storage-100",
price: 59.99,
quantity: 1,
index: 2
}
]
}
});

A customer adds a recommended product to the cart, so we push an add_to_cart event to the data layer with details about the item: the currency is EUR, the total cart value is 59.99, and the added product is Add-on Storage 100GB (ID 67890) from Acme Corp. The product has no discount, is priced at 59.99 gross, and appears as the second recommendation in the list (index 2).

At the same time, a select_promotion event is pushed to record that this item was selected from the recommendation module, identifying the promotion ID rec_002 and name Recommended Add-on. GTM can use these events together to track user interaction with recommendations, measure conversion effectiveness, and attribute sales to specific promotional placements.

select_promotion fields

FieldTypeDescription
eventstringEvent name. Always "select_promotion".
ecommerce.creative_namestring(Optional) Creative name for the placement, such as banner or module title.
ecommerce.creative_slotstring(Optional) Slot or position of the promotion, for example, "right_rail" or "footer_recommendation".
ecommerce.promotion_idstringUnique identifier of the recommendation or promotion.
ecommerce.promotion_namestringDisplay name of the recommendation or promotion.
ecommerce.itemsarrayArray containing the promoted or selected product.

ecommerce.items fields

FieldTypeDescription
item_idstringProduct ID associated with the promotion.
item_namestringProduct display name.
affiliationstringAlways "cleverbridge".
discountnumberItem-level discount (gross), if any.
item_brandstringClient account name.
item_categorystringProduct category.
item_variantstringInternal product name or variant.
pricenumberDiscounted item price (gross).
quantitynumberQuantity of the item.
Example
js
dataLayer.push({
event: "select_promotion",
ecommerce: {
creative_name: "Sidebar Bundle",
creative_slot: "right_rail",
promotion_id: "rec_002",
promotion_name: "Recommended Add-on",
items: [
{
item_id: "67890",
item_name: "Add-on Storage 100GB",
affiliation: "cleverbridge",
discount: 0,
item_brand: "Acme Corp",
item_category: "Add-on",
item_variant: "Storage-100",
price: 59.99,
quantity: 1
}
]
}
});


A customer selects a recommended product displayed in the sidebar, so we push a select_promotion event to the data layer. It identifies the promotion as rec_002 with the name Recommended Add-on, and records contextual details such as placement (right_rail) and creative (Sidebar Bundle). The associated product is Add-on Storage 100GB (ID 67890) from Acme Corp, priced at 59.99 with no discount.

GTM can use this event to measure how customers interact with recommendations and evaluate promotion performance across placements.

remove_from_cart fields

FieldTypeDescription
eventstringEvent name. Always "remove_from_cart".
ecommerce.currencystringISO 4217 currency code.
ecommerce.valuenumberOrder total (gross) after the item is removed.
ecommerce.itemsarrayArray containing details of the removed item.

ecommerce.items fields

FieldTypeDescription
item_idstringProduct ID removed from the cart.
item_namestringProduct display name.
affiliationstringAlways "cleverbridge".
discountnumberItem-level discount (gross).
item_brandstringClient account name.
item_categorystringProduct category.
item_variantstringInternal product name or variant.
pricenumberDiscounted item price (gross).
quantitynumberQuantity removed.
indexnumberRunning number or UI position of the removed item.
Example
js
dataLayer.push({
event: "remove_from_cart",
ecommerce: {
currency: "GBP",
value: 0,
items: [
{
item_id: "67890",
item_name: "Add-on Storage 100GB",
affiliation: "cleverbridge",
discount: 0,
item_brand: "Acme Corp",
item_category: "Add-on",
item_variant: "Storage-100",
price: 59.99,
quantity: 1,
index: 1
}
]
}
});

A customer removes a product from the cart, so we push a remove_from_cart event to the data layer. The event contains the item details—Add-on Storage 100GB (ID 67890) from Acme Corp, priced at 59.99 in GBP—and indicates it was the first item in the list (index 1).

GTM can use this event to track cart adjustments, update remarketing audiences, and analyze abandonment behavior.

add_payment_info fields

FieldTypeDescription
eventstringEvent name. Always "add_payment_info".
ecommerce.currencystringISO 4217 currency code.
ecommerce.valuenumberOrder total (gross) when payment details are completed or a payment option is selected.
ecommerce.itemsarrayArray containing all items in the cart at the time of the event.

ecommerce.items fields

FieldTypeDescription
item_idstringProduct ID.
item_namestringProduct display name.
affiliationstringAlways "cleverbridge".
discountnumberItem-level discount (gross).
item_brandstringClient account name.
item_categorystringProduct category.
item_variantstringInternal product name or variant.
pricenumberDiscounted item price (gross).
quantitynumberQuantity of the item.
Example
js
dataLayer.push({
event: "add_payment_info",
ecommerce: {
currency: "USD",
value: 129.99,
items: [
{
item_id: "12345",
item_name: "Pro Suite Annual",
affiliation: "cleverbridge",
discount: 20.00,
item_brand: "Acme Corp",
item_category: "Software",
item_variant: "Pro Suite",
price: 129.99,
quantity: 1
}
]
}
});

A customer completes their payment information on the checkout page, so we push an add_payment_info event to the data layer. The event includes details of the order in USD, with a total value of 129.99 and one product—Pro Suite Annual (ID 12345) from Acme Corp—with a 20.00 discount applied.

GTM can use this event to trigger analytics or conversion tags that record payment intent or checkout progression.

purchase fields

FieldTypeDescription
eventstringEvent name. Always "purchase".
ecommerce.transaction_idstringUnique reference or transaction ID for the purchase.
ecommerce.valuenumberOrder total (gross).
ecommerce.taxnumberTotal tax amount.
ecommerce.shippingnumberShipping cost, or 0 if not applicable.
ecommerce.currencystringISO 4217 currency code used for the purchase.
ecommerce.itemsarrayArray containing all purchased items.

ecommerce.items fields

FieldTypeDescription
item_idstringProduct ID.
item_namestringProduct display name.
affiliationstringAlways "cleverbridge".
discountnumberItem-level discount (gross).
item_brandstringClient account name.
item_categorystringProduct category.
item_variantstringInternal product name or variant.
pricenumberFinal item price (gross).
quantitynumberQuantity purchased.
Example
js
dataLayer.push({
event: "purchase",
ecommerce: {
transaction_id: "CB-REF-001122",
value: 129.99,
tax: 10.83,
shipping: 0,
currency: "USD",
items: [
{
item_id: "12345",
item_name: "Pro Suite Annual",
affiliation: "cleverbridge",
discount: 20.00,
item_brand: "Acme Corp",
item_category: "Software",
item_variant: "Pro Suite",
price: 129.99,
quantity: 1
}
]
}
});

A customer successfully completes a purchase, so we push a purchase event to the data layer. The event records the transaction ID CB-REF-001122, a total order value of 129.99 USD, and includes tax of 10.83 with no shipping cost. The purchased item is Pro Suite Annual (ID 12345) from Acme Corp, discounted by 20.00.

GTM can use this event to record conversions, trigger remarketing tags, and send detailed order data to analytics and advertising platforms.

How to trigger GTM tags with events

To trigger a tag when a certain ecommerce event occurs, create a new GTM trigger with the Custom Event type. Under Event Name, add one of the event names. 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.
GTM Trigger Example

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.


Did you find this doc useful?