Set up Google Analytics 4
Cleverbridge offers two ways to implement Google Analytics 4 (GA4) via Google Tag Manager (GTM):
-
As a managed solution: Cleverbridge offers different options to configure GTM GA4 on our checkout pages. Contact your Client Success Manager to find out which option is most adapted to your needs.
-
As a self-service option: You can configure and maintain your GTM GA4 on your own. Go ahead and import our standard GA4 configuration in just three steps:
- Contact our Client Experience team to enable the Data Layer required by GTM on your checkout pages.
- Log in to your GTM account. For more information, go to https://tagmanager.google.com.
- Import the Cleverbridge container.
- Click Admin in the upper-left corner of the navigation menu.
- Click Import Container.
- Click Choose container file and select the available file provided by Cleverbridge.
- To select the workspace where you want to import the container, click Existing.
- Select Merge and click Overwrite conflicting tags, triggers, and variables.
- To execute the import, click Confirm.
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. Once the import is complete, you can adjust the configuration, which must be released by Cleverbridge afterwards.
If you have any specific questions related to the GA4 configuration in the Cleverbridge GTM, contact Client Experience.
GA4 events and data layer
GA4 tracking offers a set of standard GA4 events and dataLayer
structure. You can use these events as GTM tag triggers. For more information, see About the Cleverbridge dataLayer within Integrate Google Tag Manager.
Currently, the following events are available for GTM integration:
view_cart
This event is triggered when the customer enters the checkout process for the first time.
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
}
]
}
});
begin_checkout
This event is triggered when the customer continues in the checkout process.
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
}]
}
});
add_to_cart
This event is triggered when a customer adds an additional product to the cart. This occurs as soon as the customer clicks the Add button and before the page reloads.
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
}
]
}
});
remove_from_cart
This event is triggered when a customer removes a product from the cart. The event occurs as soon as the customer clicks the Remove button and before the page reloads.
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
}
]
}
});
add_payment_info
This event is triggered when the customer adds their personal data and payment information in the checkout process and the review page appears.
The event occurs as soon as the customer clicks the Review your data button and before the page reloads. If your checkout process doesn't include a review page, the add_payment_info event isn't triggered automatically.
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
}
]
}
});
purchase
This event is triggered when an order is submitted successfully, and the customer reaches the confirmation page.
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
}]
}
});
To determine if the order was paid or unpaid, you can use the dataLayer
value for the paymentStatus
field, which can contain the following values:
paid
: the order was successfully paid.waiting for payment
: the customer chose an offline payment option (for example, wire transfer) and is expected to wire the money soon.quote
: the customer generated a price quote request that can be turned into a paid order later.test purchase
: this was a test order using one of the Cleverbridge test credit cards.
dataLayer
field cleverbridgePage
. This can contain the following values on the confirmation page:confirmation.reject
: the payment was rejected.confirmation.pending
: instant processing was not possible, and the transaction is scheduled for processing as soon as possible.confirmation.successOfflinePayment
: same aspaymentStatus
=waiting for payment
.confirmation.successInstantDelivery
: same aspaymentStatus
=paid
.
dataLayer
field cleverbridgePage
can contain the following status:confirmationpp.reject
: the second payment attempt was rejected.confirmationpp.pending
: the transaction is scheduled for processing as soon as possible.confirmationpp.successInstantDelivery
: the second payment attempt was successful.confirmationpp.successOfflinePayment
: the second payment will be completed offline (for example, wire transfer).
view_promotion
This event is triggered when a promotion appears directly on the page, or as a *Don't Leave Layer (DLL) popup window during the checkout process. The promotion can also be a recommended product like a cross-sell or an up-sell.
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
}
]
}
});
select_promotion
This event is triggered when the customer selects a promotion.
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
}
]
}
});
Custom Cleverbridge events
Event | Description |
---|---|
init | The first event triggered for initializing the dataLayer . |
dontLeaveLayer | Triggered as the DLL appears during the checkout process either on the page or as a popup window. |
dontLeaveLayerButtonClick | Triggered when customers click on the DLL page or popup window. |
paymentMethodChange | Triggered when customers change their payment method on the checkout page. |
inputFieldCompleted | Triggered when customers fill all the fields on the checkout page. |
submitOrder | Triggered when the customer clicks the Buy Now button. It occurs as soon as the customer clicks the button and before the page reloads. |
clickDownloadLink | Triggered when the customer clicks on the download link to retrieve the license key on the confirmation page. |