eCommerce events
Overview
This article lists all eCommerce events supported by the ConvertPlus shopping cart.
The ConvertPlus cart caters to the following Web Metrics solutions:
- Google Universal Analytics
- Google Tag Manager (with Universal Analytics)
- Adobe Dynamic Tag Manager
- Google Analytics 4
- Google Tag Manager (with GA4)
Each solution handles enhanced events triggered by the ConvertPlus Cart differently. Due to the fact that each Web Metrics solution prefers its data arranged in a particular way, we'll document each web solution separately, alongside a distinct section for the custom cartUpdated event.
The parameters below are used to track eCommerce events triggered by the ConvertPlus and InLine carts.
Availability
Merchant tracking is available for all 2Checkout accounts.
eCommerce events grouped by Web Metric
Google Universal Analytics
The Google Universal Analytics DataLayer differs from Google Tag Manager and Adobe's Dynamic Tag Manager in that it is an array of arrays. Each event pushed in the DataLayer is an array with various indexes, based on the type of the triggered event:
- The first element of the array determines the type of payload added to the DataLayer (it can either be event or config).
- The second element of the array determines the sub-type of the first element.
- The third element is an object with the actual data/payload.
Event | Triggered by | Notes | Example |
---|---|---|---|
begin_checkout |
LOAD_CART (load-cart) |
|
|
purchase | PLACE_ORDER (place-order:success) |
|
|
remove_from_cart |
DELETE_ITEM (delete-item) |
|
|
page_redirect |
LOAD_PAGE (load-page) | Is only triggered if the cart is redirected to the retry page |
|
Google Analytics 4
The Google Analytics 4 DataLayer differs from Google Tag Manager and Adobe's Dynamic Tag Manager in that it is an array of arrays. Each event pushed in the DataLayer is an array with various indexes, based on the type of the triggered event:
-
The first element of the array determines the type of payload added to the DataLayer (it can either be event or config).
-
The second element of the array determines the sub-type of the first element.
-
The third element is an object with the actual data/payload.
Event |
Triggered by |
Notes |
Example |
---|---|---|---|
begin_checkout |
LOAD_CART (load-cart) |
|
|
purchase |
PLACE_ORDER (place-order:success) |
|
|
remove_from_cart |
DELETE_ITEM (delete-item) |
|
|
page_redirect |
LOAD_PAGE (load-page) |
Is only triggered if the cart is redirected to the retry page |
|
add_to_cart
|
ADD_ITEM (add-item) |
|
|
view_item_list
|
LOAD_CROSS_SELL (load-cross-sell) |
|
|
Google Tag Manager with Universal Analytics
For the Google Tag Manager with Universal Analytics, the DataLayer is an array of objects. The object payload passed to the DataLayer is mainly made up of two keys: event & eCommerce.
The event key determines the type of event passed to the Datalayer, while the eCommerce key holds the eCommerce object with all the relevant event data.
Both Google Tag Manager and Adobe’s Dynamic Tag Manager follow the same advanced eCommerce layout and they also have the ability to support Custom Events (cartUpdated).
Event | Triggered by | Notes | Example |
---|---|---|---|
checkout |
|
|
|
purchase |
PLACE_ORDER (place-order:success) |
|
|
removeFromCart |
DELETE_ITEM (delete-item) |
|
|
addToCart |
ADD_ITEM (add-item) |
|
|
Google Tag Manager with GA4
Google tag manager GA4 respects the Google analytics 4 structure. The DataLayer is an array of objects. The object payload passed to the DataLayer is mainly composed of two keys: event & ecommerce.
The event key determines the type of event passed to the Datalayer, while the eCommerce key holds the eCommerce object with all the relevant event data.
Event |
Triggered by |
Notes |
Example |
---|---|---|---|
begin_checkout |
LOAD_CART (load-cart) SET_ECOMMERCE (set-ecommerce) |
|
|
purchase |
PLACE_ORDER (place-order:success) |
|
|
remove_from_cart |
DELETE_ITEM (delete-item) |
|
|
add_to_cart |
ADD_ITEM (add-item) |
|
|
add_to_cart
|
LOAD_CROSS_SELL (load-cross-sell) |
|
|
Adobe's Dynamic Tag Manager
Event | Triggered by | Notes | Example |
---|---|---|---|
checkout |
|
|
|
purchase |
PLACE_ORDER (place-order:success) |
|
|
removeFromCart |
DELETE_ITEM (delete-item) |
|
|
addToCart |
ADD_ITEM (add-item) |
|
|
Custom events (cartUpdated)
Some Web Metric solutions allow the use of custom events. Currently, these solutions are Adobe’s Dynamic Tag Manager and Google Tag Manager.
Custom events allow us to pass any values under any keys we see fit, as long as we provide an acceptable and consistent format.
The format of a custom event is as follows:
{
"event": "cartUpdated",
"CUSTOM_KEY_1": "custom_value_1",
"CUSTOM_KEY_2": "custom_value_2",
...
}
The event key will always be populated with the cartUpdated value as this is the name of our custom event. Alongside the event key, you can find any number of custom keys, like their number, names, and values vary and depend on the action that the user performed in the cart.
The Convert Plus shopping cart implements an event buffer.
When a shopper performs an action in the cart, the cart triggers a lot of internal events that in turn trigger other events which may lead to the cart being overloaded when booting for changing its state.
To prevent the DataLayer from being spammed by unnecessary small updates, the event buffer was designed to do just that, buffer events. Catch all events in a designated time (1 s at the moment of this writing), keeping only their newest value, and release them in bigger chunks.
The custom keys used by the cartUpdated event are as follow:
Event | Triggered by | Values | Notes | Example |
---|---|---|---|---|
PAGE_NAME |
|
|
|
|
PAGE_THEME |
|
|
The loaded theme’s name. |
|
merchant_CODE |
|
The 2CheckOut code form GAP. |
|
|
ONESTEPCART |
|
Boolean |
|
|
SHORT_FORM |
|
Boolean |
|
|
PURCHASE_COMPLETE |
|
Boolean |
|
|
TEMPLATE_CREATION_DATE |
|
|
|
|
TEMPLATE_LAST_MODIFIED_DATE |
|
|
|
|
PAGE_STYLE_NAME |
|
The name of the customized theme. |
|
|
PROFESSIONAL_SERVICES |
|
Boolean | Determined by whether the template has been customized by professional services. |
|
TEST_ORDER |
|
Boolean | Is true if the loaded cart is in test mode. |
|
PRODUCT_SOURCE |
|
|
Determined by the products in the cart. |
|
CART_LOCK |
|
Boolean | Is set to true if the cart is locked. |
|
DISCOUNT_COUPON |
|
Coupon code |
|
|
DISCOUNT_COUPON_STATUS |
|
|
|
|
COMPANY_NAME |
|
Company name. | The company name entered by the user while the company flow is selected. |
|
ORDER_EXT_REF |
|
String | The external reference set by the merchant. |
|
CUSTOMER_EXT_REF |
|
String | The external customer reference set by the merchant. |
|
AUTO_RENEWAL |
|
|
The status is computed based on the visibility of the recurring button (Recurring option in GAP account settings) & the actual recurring status of the order. |
|
PURCHASE_TYPE |
|
|
|
|
ADDITIONAL_HIDDEN_FIELDS |
|
The value of the additional hidden field may be null if it has no value. | Array of hidden additional fields. |
|
BILLING_COUNTRY |
|
The country code. |
|
|
VISITOR_COUNTRY |
|
The country code. |
|
|
BILLING_CURRENCY |
|
The currency code. |
|
|
LANGUAGE |
|
The language code. |
|
|
FORM_ERROR |
SET_ERRORS (set-errors) | Form field names separated by | | The form field where an error occurred in the cart. |
|
PAYMENT_METHOD |
UPDATE_PAYMENT_METHOD (change:paymentMethod) | The payment method code. |
|
|
PAYMENT_METHOD_TYPE |
UPDATE_PAYMENT_METHOD (change:paymentMethod) |
|
|
|
PAYMENT_CATEGORY |
UPDATE_PAYMENT_METHOD (change:paymentMethod) | Payment method label. | The payment method label selected in the shopping cart (Credit card, wire, or any other method). |
|
QUANTITY_CHANGED |
UPDATE_ITEM (update-item) | Integer |
|
|
CART_STEP |
UPDATE_CART_STEP (change:cartStep) |
|
Only triggered for the InLine themes. |
|
ADDITIONAL_FIELDS_COUNT |
UPDATE_ADDITIONAL_FIELD_COUNT (additional-fields-count-changed) | Integer | The number of additional fields present in the cart. |
|
PURCHASE_FLOW |
UPDATE_PURCHASE_FLOW (set-purchase-flow) |
|
Set by the customer when selecting the purchase flow. |
|
SOURCE |
UPDATE_ADDITIONAL_FIELD_COUNT (additional-fields-count-changed) | The source value. | Merchant defined source. |
|
time |
SET_ECOMMERCE (set-ecommerce) | Timestamp | Sets the current time as a timestamp after a SET_ECOMMERCE event. |
|
CREDIT_CARD_INSTALLMENTS |
UPDATE_HAS_INSTALLMENTS (set-has-cc-installments) |
|
|