Use Google Analytics
The Cleverbridge Google Analytics integration is the recommended way to measure and analyze behavior on your checkout pages. It uses the same checkout data layer that powers Google Tag Manager (GTM), so you can send consistent, structured events into Google Analytics (GA4 or, for legacy setups, Universal Analytics) for reporting, attribution, and optimization.
Google Analytics tracking is available on both Checkout 1.0 and Checkout 2.0 pages.
Set up the integration
As a fully managed solution, Cleverbridge provides multiple options for configuring GA4 via Google Tag Manager on your checkout pages. Reach out to your Client Success Manager to explore the setup that’s best aligned with your goals.
You can also set up GA4 tracking yourself using Google Tag Manager by following Google’s official implementation guides.
-
Create or choose your Google Analytics property.
- For new implementations we recommend Google Analytics 4 (GA4).
- Many legacy Checkout 1.0 setups still send Enhanced Ecommerce data to Universal Analytics.
-
Contact the Client Experience team to enable the checkout data layer and the Google Analytics integration for your account.
-
Import the Cleverbridge container file we provide:
- In GTM, go to Admin panel.
- Click Import Container.
- Click Choose container file and select the file you received from Cleverbridge.
- Under Choose workspace, select Existing and pick the workspace where you want to import the container.
- Under Choose import option, select Merge and Overwrite conflicting tags, triggers, and variables.
- Click Confirm to execute the import.
We strongly recommend you execute the import via the Cleverbridge import container we’ll provide upon request, as our individually created triggers ensure a GDPR-compliant use. After the import, you can adapt the configuration to your needs. Any changes must be released by Cleverbridge before they become active on your production checkout.
If you have specific questions related to the GA4 configuration in the Cleverbridge GTM container, contact Client Experience.
How Cleverbridge works with Google Analytics
Cleverbridge exposes all checkout data through a structured dataLayer that you can use both in Google Tag Manager and in Google Analytics.
As this article focuses on Google Analytics, we assume you’ve already read the Use Google Tag Manager article and are familiar with:
- The Cleverbridge dataLayer and its fields.
- The list of checkout events for Checkout 1.0 and Checkout 2.0.
- How GTM variables read values from the dataLayer.
Now, let's focus on how those same events and fields are used inside Google Analytics.
GA4 vs Universal Analytics
Cleverbridge supports both Google Analytics 4 (GA4) and Universal Analytics (UA), but they work slightly differently:
| Aspect | GA4 (recommended) | Universal Analytics (legacy) |
|---|---|---|
| Property type | Event-based | Session & pageview-based |
| Ecommerce model | GA4 Ecommerce events (view_cart, begin_checkout, add_to_cart, purchase, etc.) | Enhanced Ecommerce (ec/ecommerce objects) |
| Recommended with | Checkout 2.0 and Checkout 1.0 | Existing legacy Checkout 1.0 setups |
| Status | Actively developed by Google | Deprecated, maintained only for legacy use |
How events are sent to Google Analytics
In most setups, Google Analytics receives Cleverbridge events in one of two ways:
-
Via Google Tag Manager (recommended)
- GTM listens for dataLayer events (for example,
view_cart,begin_checkout,add_to_cart,purchase). - GA tags in GTM map dataLayer fields (such as
ecommerce.items,ecommerce.value,transactionId) to GA parameters and item fields.
- GTM listens for dataLayer events (for example,
-
Via direct
gtag.jscalls- Your
gtag.jsimplementation listens for the samedataLayerevents. - When an event occurs, you call
gtag('event', '<event_name>', { ... })and pass the relevant values from the Cleverbridge object (for example,transaction_id,currency,value, anditems).
- Your
In both cases, the event names and fields are the same ones you know from the Use Google Tag Manager article – the difference is only how you send them into Google Analytics.
Events and data layer
Google Analytics uses the same Cleverbridge events as GTM, but with a GA-specific naming and payload for some flows.
- Checkout 2.0
- Checkout 1.0
The following GA4 events are available for Checkout 2.0 via GTM:
| Event | Triggered when |
|---|---|
| begin_checkout | Customer opens Checkout 2.0 for the first time. |
| page_view | Customer views any step in the checkout flow. Fires on initial load and each step change. |
| add_to_cart | Customer adds a recommended product to the cart. The event fires immediately when the customer clicks Add, before the page reloads. Also emits select_promotion for the chosen recommendation. |
| select_promotion | A recommendation/promotion is selected and added to the cart. Emitted together with add_to_cart. |
| remove_from_cart | Customer removes a line item from the cart. The event fires immediately when the customer clicks Remove, before the page reloads. |
| add_payment_info | Customer 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. |
| purchase | Customer clicks Buy now and the system successfully generates a purchase ID with no validation errors. Fires exactly once per unique purchase ID. |
Standard GA4 ecommerce events (Checkout 1.0)
The following GA4 events are available for Checkout 1.0 via GTM:
| Event | Triggered when |
|---|---|
| view_cart | The customer enters the checkout process for the first time. |
| begin_checkout | The customer continues in the checkout process (for example, from cart to next step). |
| add_to_cart | The customer adds an additional product to the cart (for example, a recommendation). The event fires as soon as the customer clicks Add, before the page reloads. |
| remove_from_cart | The customer removes a product from the cart. The event fires as soon as the customer clicks Remove, before the page reloads. |
| add_payment_info | The customer submits their personal and payment information and the review page appears. If your checkout process does not include a review page, this event is not triggered automatically. |
| purchase | The order is submitted successfully and the customer reaches the confirmation page. |
| view_promotion | A promotion appears on the page or as a “Don’t Leave Layer” (DLL) popup during the checkout (for example, cross-sell, up-sell, or other recommended product). |
| select_promotion | The customer selects a promotion (for example, by clicking a recommended product or DLL button). |
Custom Cleverbridge events (Checkout 1.0)
In addition to GA4 ecommerce events, Checkout 1.0 exposes a set of custom Cleverbridge events that you can optionally send into GA4 as custom events or use purely for GTM logic:
| Event | Description |
|---|---|
| init | First event used to initialize the dataLayer. |
| dontLeaveLayer | Triggered when the DLL appears during the checkout process (inline or as a popup). |
| dontLeaveLayerButtonClick | Triggered when customers interact with the DLL (for example, click a button). |
| paymentMethodChange | Triggered when customers change their payment method on the checkout page. |
| inputFieldCompleted | Triggered when customers complete all required input fields on the checkout page. |
| submitOrder | Triggered when the customer clicks the Buy Now button (fires before the page reloads and does not guarantee a successful order). |
| clickDownloadLink | Triggered when the customer clicks the download link to retrieve the license key on the confirmation page. |
You can use these custom events in GA4 to build additional funnels, debug customer behavior, or create remarketing audiences (for example, “started order but did not reach purchase”).
Data fields and examples for basic events
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:
- Checkout 2.0
- Checkout 1.0
begin_checkout fields
| Field | Type | Description |
|---|---|---|
| event | string | Event name. Always "begin_checkout". |
| ecommerce.currency | string | ISO 4217 currency code selected by the customer. |
| ecommerce.value | number | Order total (gross) at the time of the event. |
| ecommerce.items | array | Array of items currently in the cart. |
ecommerce.items fields
| Field | Type | Description |
|---|---|---|
| item_id | string | Product ID. |
| item_name | string | Product display name. |
| affiliation | string | Always "cleverbridge". |
| coupon | string | Applied coupon code, if any. |
| discount | number | Item-level discount (gross). |
| item_brand | string | Client account name. |
| item_category | string | Product category. |
| item_variant | string | Internal product name or variant. |
| price | number | Discounted item price (gross). |
| quantity | number | Quantity of the item. |
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.
page_view fields
| Field | Type | Description |
|---|---|---|
| event | string | Event name. Always "page_view". |
| subscription_type | string | Subscription type (for example, "none", "auto_renew", or another configured value). |
| checkout_type | string | Checkout context (for example, "new" or "upgrade"). |
| affiliation | string | Always "cleverbridge". |
| language | string | Selected language (ISO code). |
| transaction_interval | number | Subscription interval in months; 0 for one-time purchases. |
| currency | string | Selected currency (ISO 4217). |
| cart_id | string | Value of the &cart parameter, if present. |
| entry_url | string | Customer’s checkout entry URL. |
| page_name | string | Logical step identifier (for example, funnelName.templateSteps.progressStep). |
| session_id | string | Checkout session ID. |
| x-parameters | array | Array of custom key–value pairs provided via x-parameters. |
| country | string | Delivery country (ISO code). |
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
| Field | Type | Description |
|---|---|---|
| event | string | Event name. Always "add_to_cart". |
| ecommerce.currency | string | ISO 4217 currency code. |
| ecommerce.value | number | Order total (gross) after the add. |
| ecommerce.items | array | Array with the added item (and optionally cart context). |
commerce.items fields
| Field | Type | Description |
|---|---|---|
| item_id | string | Product ID added from recommendations. |
| item_name | string | Product display name. |
| affiliation | string | Always "cleverbridge". |
| discount | number | Item-level discount (gross). |
| item_brand | string | Client account name. |
| item_category | string | Product category. |
| item_variant | string | Internal product name or variant. |
| price | number | Discounted item price (gross). |
| quantity | number | Quantity added. |
| index | number | Recommendation array index (position in the recommendation list). |
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
| Field | Type | Description |
|---|---|---|
| event | string | Event name. Always "select_promotion". |
| ecommerce.creative_name | string | (Optional) Creative name for the placement, such as banner or module title. |
| ecommerce.creative_slot | string | (Optional) Slot or position of the promotion, for example, "right_rail" or "footer_recommendation". |
| ecommerce.promotion_id | string | Unique identifier of the recommendation or promotion. |
| ecommerce.promotion_name | string | Display name of the recommendation or promotion. |
| ecommerce.items | array | Array containing the promoted or selected product. |
ecommerce.items fields
| Field | Type | Description |
|---|---|---|
| item_id | string | Product ID associated with the promotion. |
| item_name | string | Product display name. |
| affiliation | string | Always "cleverbridge". |
| discount | number | Item-level discount (gross), if any. |
| item_brand | string | Client account name. |
| item_category | string | Product category. |
| item_variant | string | Internal product name or variant. |
| price | number | Discounted item price (gross). |
| quantity | number | Quantity of the item. |
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
| Field | Type | Description |
|---|---|---|
| event | string | Event name. Always "remove_from_cart". |
| ecommerce.currency | string | ISO 4217 currency code. |
| ecommerce.value | number | Order total (gross) after the item is removed. |
| ecommerce.items | array | Array containing details of the removed item. |
ecommerce.items fields
| Field | Type | Description |
|---|---|---|
| item_id | string | Product ID removed from the cart. |
| item_name | string | Product display name. |
| affiliation | string | Always "cleverbridge". |
| discount | number | Item-level discount (gross). |
| item_brand | string | Client account name. |
| item_category | string | Product category. |
| item_variant | string | Internal product name or variant. |
| price | number | Discounted item price (gross). |
| quantity | number | Quantity removed. |
| index | number | Running number or UI position of the removed item. |
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
| Field | Type | Description |
|---|---|---|
| event | string | Event name. Always "add_payment_info". |
| ecommerce.currency | string | ISO 4217 currency code. |
| ecommerce.value | number | Order total (gross) when payment details are completed or a payment option is selected. |
| ecommerce.items | array | Array containing all items in the cart at the time of the event. |
ecommerce.items fields
| Field | Type | Description |
|---|---|---|
| item_id | string | Product ID. |
| item_name | string | Product display name. |
| affiliation | string | Always "cleverbridge". |
| discount | number | Item-level discount (gross). |
| item_brand | string | Client account name. |
| item_category | string | Product category. |
| item_variant | string | Internal product name or variant. |
| price | number | Discounted item price (gross). |
| quantity | number | Quantity of the item. |
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
| Field | Type | Description |
|---|---|---|
| event | string | Event name. Always "purchase". |
| ecommerce.transaction_id | string | Unique reference or transaction ID for the purchase. |
| ecommerce.value | number | Order total (gross). |
| ecommerce.tax | number | Total tax amount. |
| ecommerce.shipping | number | Shipping cost, or 0 if not applicable. |
| ecommerce.currency | string | ISO 4217 currency code used for the purchase. |
| ecommerce.items | array | Array containing all purchased items. |
ecommerce.items fields
| Field | Type | Description |
|---|---|---|
| item_id | string | Product ID. |
| item_name | string | Product display name. |
| affiliation | string | Always "cleverbridge". |
| discount | number | Item-level discount (gross). |
| item_brand | string | Client account name. |
| item_category | string | Product category. |
| item_variant | string | Internal product name or variant. |
| price | number | Final item price (gross). |
| quantity | number | Quantity purchased. |
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.
view_cart fields
| Field | Type | Description |
|---|---|---|
| event | string | Event name. Always "view_cart". |
| ecommerce.currency | string | ISO 4217 currency code selected by the customer. |
| ecommerce.value | number | Order total (gross) at the time of the event. |
| ecommerce.items | array | Array of items currently in the cart. |
ecommerce.items fields
| Field | Type | Description |
|---|---|---|
| item_id | string | Product ID. |
| item_name | string | Product display name. |
| affiliation | string | Always "cleverbridge". |
| coupon | string | Applied coupon code, if any. |
| discount | number | Item-level discount (gross). |
| item_brand | string | Client account or brand name. |
| item_category | string | Product category. |
| item_variant | string | Internal product name or variant. |
| price | number | Item price (gross). |
| quantity | number | Quantity of the item. |
dataLayer.push({
event: "view_cart",
ecommerce: {
currency: "USD",
value: 7.77,
items: [
{
item_id: "12345",
item_name: "Anti-Malware",
affiliation: "cleverbridge",
coupon: "CYBER_WEEK",
discount: 2.22,
item_brand: "brandValue",
item_category: "categoryValue",
item_variant: "variantValue",
price: 9.99,
quantity: 1
}
]
}
});
A customer enters the checkout process for the first time, so we push a view_cart event with the current cart content, including currency, cart value, and all items.
begin_checkout fields
| Field | Type | Description |
|---|---|---|
| event | string | Event name. Always "begin_checkout". |
| ecommerce.currency | string | ISO 4217 currency code selected by the customer. |
| ecommerce.value | number | Order total (gross) at the time of the event. |
| ecommerce.coupon | string | Coupon applied at order level, if any. |
| ecommerce.items | array | Array of items currently in the cart. |
ecommerce.items fields
| Field | Type | Description |
|---|---|---|
| item_id | string | Product ID. |
| item_name | string | Product display name. |
| affiliation | string | Always "cleverbridge". |
| coupon | string | Applied coupon code, if any. |
| discount | number | Item-level discount (gross). |
| item_brand | string | Client account or brand name. |
| item_category | string | Product category. |
| item_variant | string | Internal product name or variant. |
| price | number | Item price (gross). |
| quantity | number | Quantity of the item. |
dataLayer.push({
event: "begin_checkout",
ecommerce: {
currency: "USD",
value: 7.77,
coupon: "CYBER_MONDAY",
items: [
{
item_id: "54321",
item_name: "Shieldware_ Antivirus",
affiliation: "cleverbridge",
coupon: "CYBER_MONDAY",
discount: 2.22,
item_brand: "brandValue",
item_category: "categoryValue",
item_variant: "variantValue",
price: 11.99,
quantity: 1
}
]
}
});
A customer continues in the checkout process (for example, from cart to the next step), so we push a begin_checkout event with the current order value and items.
add_to_cart fields
| Field | Type | Description |
|---|---|---|
| event | string | Event name. Always "add_to_cart". |
| ecommerce.currency | string | ISO 4217 currency code. |
| ecommerce.value | number | Order total (gross) after the add. |
| ecommerce.items | array | Array containing the added item (and optionally cart context). |
ecommerce.items fields
| Field | Type | Description |
|---|---|---|
| item_id | string | Product ID added to the cart. |
| item_name | string | Product display name. |
| affiliation | string | Always "cleverbridge". |
| coupon | string | Applied coupon code, if any. |
| discount | number | Item-level discount (gross). |
| index | number | Recommendation index or position in a list, if applicable. |
| item_brand | string | Client account or brand name. |
| item_category | string | Product category. |
| item_variant | string | Internal product name or variant. |
| price | number | Item price (gross). |
| quantity | number | Quantity added. |
dataLayer.push({
event: "add_to_cart",
ecommerce: {
currency: "USD",
value: 7.77,
items: [
{
item_id: "43215",
item_name: "Shieldware VPN",
affiliation: "cleverbridge",
coupon: "CYBER_MONDAY",
discount: 2.22,
index: 0,
item_brand: "brandValue",
item_category: "categoryValue",
item_variant: "variantValue",
price: 9.99,
quantity: 1
}
]
}
});
A customer adds a recommended product to the cart, so we push an add_to_cart event with the added item and updated order value.
remove_from_cart fields
| Field | Type | Description |
|---|---|---|
| event | string | Event name. Always "remove_from_cart". |
| ecommerce.currency | string | ISO 4217 currency code. |
| ecommerce.value | number | Order total (gross) after the item is removed. |
| ecommerce.items | array | Array containing the removed item. |
ecommerce.items fields
| Field | Type | Description |
|---|---|---|
| item_id | string | Product ID removed from the cart. |
| item_name | string | Product display name. |
| affiliation | string | Always "cleverbridge". |
| coupon | string | Applied coupon code, if any. |
| discount | number | Item-level discount (gross). |
| index | number | Position of the removed item in the list, if applicable. |
| item_brand | string | Client account or brand name. |
| item_category | string | Product category. |
| item_variant | string | Internal product name or variant. |
| price | number | Item price (gross). |
| quantity | number | Quantity removed. |
dataLayer.push({
event: "remove_from_cart",
ecommerce: {
currency: "USD",
value: 7.77,
items: [
{
item_id: "12345",
item_name: "Shieldware_ Antivirus",
affiliation: "cleverbridge",
coupon: "CYBER_MONDAY",
discount: 2.22,
index: 0,
item_brand: "brandValue",
item_category: "categoryValue",
item_variant: "variantValue",
price: 9.99,
quantity: 1
}
]
}
});
A customer removes a product from the cart, so we push a remove_from_cart event that describes which item was removed and the updated cart value.
add_payment_info fields
| Field | Type | Description |
|---|---|---|
| event | string | Event name. Always "add_payment_info". |
| ecommerce.currency | string | ISO 4217 currency code. |
| ecommerce.value | number | Order total (gross) when payment details are submitted. |
| ecommerce.coupon | string | Coupon applied at order level, if any. |
| ecommerce.items | array | Array containing all items in the cart at the time of the event. |
ecommerce.items fields
| Field | Type | Description |
|---|---|---|
| item_id | string | Product ID. |
| item_name | string | Product display name. |
| affiliation | string | Always "cleverbridge". |
| coupon | string | Applied coupon code, if any. |
| discount | number | Item-level discount (gross). |
| item_brand | string | Client account or brand name. |
| item_category | string | Product category. |
| item_variant | string | Internal product name or variant. |
| price | number | Item price (gross). |
| quantity | number | Quantity of the item. |
dataLayer.push({
event: "add_payment_info",
ecommerce: {
currency: "USD",
value: 7.77,
coupon: "CYBER_MONDAY",
items: [
{
item_id: "12345",
item_name: "Shieldware_ Antivirus",
affiliation: "cleverbridge",
coupon: "CYBER_MONDAY",
discount: 2.22,
item_brand: "brandValue",
item_category: "categoryValue",
item_variant: "variantValue",
price: 9.99,
quantity: 1
}
]
}
});
A customer submits their personal and payment information and the review page appears, so we push an add_payment_info event with the current order context.
purchase fields
| Field | Type | Description |
|---|---|---|
| event | string | Event name. Always "purchase". |
| ecommerce.transaction_id | string | Unique reference or transaction ID for the purchase. |
| ecommerce.value | number | Order total (gross). |
| ecommerce.tax | number | Total tax amount. |
| ecommerce.shipping | number | Shipping cost, or 0 if not applicable. |
| ecommerce.currency | string | ISO 4217 currency code used for the purchase. |
| ecommerce.coupon | string | Coupon applied at order level, if any. |
| ecommerce.items | array | Array containing all purchased items. |
ecommerce.items fields
| Field | Type | Description |
|---|---|---|
| item_id | string | Product ID. |
| item_name | string | Product display name. |
| affiliation | string | Always "cleverbridge". |
| coupon | string | Applied coupon code, if any. |
| discount | number | Item-level discount (gross). |
| index | number | (Optional) Position of the item in a list or recommendation block. |
| item_brand | string | Client account or brand name. |
| item_category | string | Product category. |
| item_variant | string | Internal product name or variant. |
| promotion_id | string | Promotion ID associated with the item, if any. |
| promotion_name | string | Promotion name associated with the item, if any. |
| price | number | Final item price (gross). |
| quantity | number | Quantity purchased. |
dataLayer.push({
event: "purchase",
ecommerce: {
transaction_id: "2435",
value: 25.42,
tax: 4.90,
shipping: 5.99,
currency: "USD",
coupon: "CYBER_MONDAY",
items: [
{
item_id: "12345",
item_name: "Shieldware Antivirus",
affiliation: "cleverbridge",
coupon: "CYBER_MONDAY",
discount: 2.22,
item_brand: "brandValue",
item_category: "categoryValue",
price: 9.99,
quantity: 1
},
{
item_id: "12346",
item_name: "Shieldware VPN",
affiliation: "cleverbridge",
coupon: "CYBER_MONDAY",
discount: 3.33,
index: 1,
item_brand: "brandValue",
item_category: "categoryValue",
item_variant: "variantValue",
price: 20.99,
promotion_id: "12345",
promotion_name: "Cyber Week Sale",
quantity: 1
}
]
}
});
When an order is submitted successfully and the customer reaches the confirmation page, we push a purchase event with transaction details and all purchased items.
To determine if the order was paid or unpaid, you can use the paymentStatus field in the dataLayer. Possible values include:
paid– the order was successfully paid.waiting for payment– the customer chose an offline payment option (for example, wire transfer) and is expected to pay later.quote– the customer generated a price quote request that can be turned into a paid order later.test purchase– a test order using one of the Cleverbridge test credit cards.
You can also gain additional insights by analyzing the cleverbridgePage field on the confirmation page, for example:
confirmation.reject– the payment was rejected.confirmation.pending– instant processing was not possible; the transaction is queued.confirmation.successOfflinePayment– the order completed with offline payment (similar towaiting for payment).confirmation.successInstantDelivery– the order completed with immediate payment approval (similar topaid).
For a second payment attempt, cleverbridgePage can contain:
confirmationpp.reject– the second payment attempt was rejected.confirmationpp.pending– the second attempt is queued for processing.confirmationpp.successInstantDelivery– the second attempt succeeded with immediate approval.confirmationpp.successOfflinePayment– the second attempt will be completed offline.
view_promotion fields
| Field | Type | Description |
|---|---|---|
| event | string | Event name. Always "view_promotion". |
| ecommerce.promotion_id | string | Promotion ID that is being displayed. |
| ecommerce.promotion_name | string | Human-readable promotion name. |
| ecommerce.items | array | Array containing the promoted item(s). |
ecommerce.items fields
| Field | Type | Description |
|---|---|---|
| item_id | string | Product ID linked to the promotion. |
| item_name | string | Product display name. |
| affiliation | string | Always "cleverbridge". |
| coupon | string | Applied coupon code, if any. |
| discount | number | Item-level discount (gross). |
| item_brand | string | Client account or brand name. |
| item_category | string | Product category. |
| item_variant | string | Internal product name or variant. |
| price | number | Item price (gross). |
| quantity | number | Quantity associated with the promotion. |
dataLayer.push({
event: "view_promotion",
ecommerce: {
promotion_id: "12345",
promotion_name: "Cyber Week Sale",
items: [
{
item_id: "12345",
item_name: "Shieldware VPN",
affiliation: "cleverbridge",
coupon: "CYBER_MONDAY",
discount: 2.22,
item_brand: "brandValue",
item_category: "categoryValue",
item_variant: "variantValue",
price: 9.99,
quantity: 1
}
]
}
});
When a promotion (for example, a DLL popup or an inline recommended product) is shown, we push a view_promotion event describing the promotion and the associated product.
select_promotion fields
| Field | Type | Description |
|---|---|---|
| event | string | Event name. Always "select_promotion". |
| ecommerce.creative_name | string | Name of the creative (for example, banner or module title). |
| ecommerce.creative_slot | string | Slot or position where the promotion was shown. |
| ecommerce.promotion_id | string | Promotion ID selected by the customer. |
| ecommerce.promotion_name | string | Human-readable promotion name selected by the customer. |
| ecommerce.items | array | Array containing the selected promoted item. |
ecommerce.items fields
| Field | Type | Description |
|---|---|---|
| item_id | string | Product ID associated with the selected promotion. |
| item_name | string | Product display name. |
| affiliation | string | Always "cleverbridge". |
| coupon | string | Applied coupon code, if any. |
| discount | number | Item-level discount (gross). |
| item_brand | string | Client account or brand name. |
| item_category | string | Product category. |
| item_variant | string | Internal product name or variant. |
| location_id | string | Optional location ID for the promotion placement. |
| price | number | Item price (gross). |
| quantity | number | Quantity of the selected item. |
dataLayer.push({
event: "select_promotion",
ecommerce: {
creative_name: "Summer Banner",
creative_slot: "featured_app_1",
promotion_id: "6543",
promotion_name: "Cyber Week Sale",
items: [
{
item_id: "12345",
item_name: "Shieldware VPN",
affiliation: "cleverbridge",
coupon: "CYBER_MONDAY",
discount: 2.22,
item_brand: "brandValue",
item_category: "categoryValue",
item_variant: "variantValue",
location_id: "ChGGJHFpAG2ahYAR_6128GcWENo",
price: 9.99,
quantity: 1
}
]
}
});
When a customer clicks a promoted product (for example, in a banner or DLL), we push a select_promotion event so GA4 can attribute conversions to that promotion and placement.