Before You Begin
1. Google Tag Manager and GA4 accounts
You will need to get your site's Container ID from Google Tag Manager. Before you start, your Tag Manager and GA4 accounts should be ready.
Learn more at Google: Set up GA4; Google Tag Manager with GA4
2. CMS Analytics feature enabled in CMS
If Analytics is not enabled, contact Commerce Vision.
3. Templates/Widgets Setup
To track product clicks (select_item event in GA4) for certain List Types check that templates where users can select a product has these setups:
Product List Grid widget: zoned layouts are enabled for Products and Categories. Affects List Type: Product List
(Go to Pages & Templates → Products and check the Product List Grid widget is using a zoned layout.)
List Type: Items Recently Viewed works with the Recently Viewed widget added on a page or template.
List Types: Cross Sell, Upsell works with the CrossSell/Upsell widget added on a page or template, e.g., Product Detail page.
List Type: Campaign works with the Campaign Slider widget added on a page or template.
4. Enable Favourites for Prior Purchases
For sites that use the Populate Favourites Widget
This widget lets logged in users add products from their purchase history to their favourites list. This List Type (User Favourites) is tracked by the View_Item_List event. Make sure each Role you want User Favourites to be tracked has Customer Favourites enabled:
Set CMS Analytics to GA4
1. Select GA4 version
In the CMS, go to: Settings → Settings → Systems → Analytics.With Analytics enabled on your site, click Configure.
In Analytics Feature Settings, toggle ON Enable Analytics.
In Analytics Version, select 'GA4'. TIP - GA4 should be selected if you are implementing Tag Manager for the first time.
In Google Tag Manager ID, enter the GA4 ID.
When the ID was entered in step 5, three options appear.
Event and Parameter Reference Guide
This section details the data sent for each event.
item exists an array [ ] with a number of parameters. It is included when an event can contain one or more specific products and its details, e..g, events where users view or select specific products.
Item parameters below are included out-of-the-box.
Name
items
Parameter
CV Value
Notes
item_name
product description
Product description. One of item_id
or item_name
is required.
item_id
product code
Product code. One of item_id
or item_name
is required.
item_category
product category
top level/primary category.
You can specify up to 5 categories:
item_category: "Apparel",
item_category2: "Adult",
item_category3: "Shirts",
item_category4: "Crew",
item_category5: "Short sleeve
Before You Begin
1. CMS Analytics feature enabled in CMS
If Analytics is not enabled, contact Commerce Vision.
2. Templates/Widgets Setup
To track product clicks (select_item event in GA4) for certain List Types check that templates where users can select a product has these setups:
Product List Grid widget: zoned layouts are enabled for Products and Categories. Affects List Type: Product List
(Go to Pages & Templates → Products and check the Product List Grid widget is using a zoned layout.)
List Type: Items Recently Viewed works with the Recently Viewed widget added on a page or template.
List Types: Cross Sell, Upsell works with the CrossSell/Upsell widget added on a page or template, e.g., Product Detail page.
List Type: Campaign works with the Campaign Slider widget added on a page or template.
Set CMS Analytics to GA4
1. Select GA4 version
- In the CMS, go to: Settings → Feature Management→ System → Analytics.
- With Analytics enabled on your site, click Configure.
- In Analytics Feature Settings, toggle ON Enable Analytics.
- In Analytics Version, select 'GA4'. TIP - GA4 should be selected if you are implementing Tag Manager for the first time.
- In Google Tag Manager ID, enter the Tag Manager ID.
- When the ID was entered in step 5, three options appear.
- Digital Remarketing - does not apply to GA4
- Enhanced Rich Snippet - this allows you to add a code snippet that enhances search results visually, e.g., include ratings when a product's page is listed. See: Enhanced Rich Snippets
- Tick Enhanced Ecommerce so it's on
- Click Save.
- Next, you should consider following our other guide: Setup GA4 via Google Tag Manager
Event and Parameter Reference Guide
This section details the data sent for each event.
Info | ||
---|---|---|
| ||
All data pushed has been matched to the structure that Google recommends as closely as possible (as per 2024 guidelines), this should mean that no data transformation / restructuring is in the data layer / Google Tag Manager. |
Anchor | ||||
---|---|---|---|---|
|
This event is triggered when the search results render from any of the following widgets
Product Search With Category Widget
Product Search Widget
Product Search With Preview Widget
Product Favourites page
Cart
Item parameters below are included out-of-the-box.
Name |
| |
---|---|---|
Parameter | CV Value | Notes |
search_term | Search term | The search term used for search query |
Anchor | ||||
---|---|---|---|---|
|
The view_item event triggers when the product details page loads.
Item parameters below are included out-of-the-box.
Name |
| |
---|---|---|
Parameter | CV Value | Notes |
item_name | product description | Product description. One of |
item_id | product code | Product code. One of |
item_category | product category | top level/primary category. You can specify up to 5 categories:
|
item_list_name | list type | List type of list product was in:
*NOTE - Zoned Product Layout must be in use for Ecommerce to work with lists. If set, event-level |
item_brand | brand | Product's brand. NOTE - Currently not standard inclusion from CV ecommerce platform. Must be custom added. |
index | numerical value | position of item presented in list (if applicable) |
price | Monetary nett price of the product, in the specified currency. | If 'hide pricing' is enabled at Role level, this data is not pushed. |
currency | currency of site in 3-letter ISO 4217 format | Multiple currencies per event is not supported. Each item should set the same currency. For GA4, currency can be set at both item and event levels. When item level currency has been set, any event-level setting is ignored. Event level structure: event.currency |
value | Total item value | The same as price, but shown outside of the items array Event level structure: event.value |
user_id | id | The CV site user id (only available for logged in users) |
view_item_list
The view_item_list event is logged when the user has been presented with a list of items from a certain category or search results, e.g., from a search results, a category list or user's favourites.
Data sent include items,
to specify each product with their details.
Event Name | view_item_list | |
---|---|---|
Parameter | Value | Notes |
item_list_name | list type | For list type names, see: List Names Ignored if set at the item-level. |
Event | items [ ] | An array with each product in the list. Required: yes See: items event and variables/values for product data sent. |
user_id | id | The CV site user id (only available for logged in users) |
Anchor ecomclicks ecomclicks
select_item
ecomclicks | |
ecomclicks |
The select_item event signifies an item was selected from a list, i.e., product was clicked. Data is pushed on any click on a product link, e.g., on a search results page or from the user's favourites list. It includes data from the items array with the clicked product as the only product.
Event Name | select_item | |
---|---|---|
Variable | Value | Notes |
item_name | product description | Product description. One of |
item_id | product code | Product code. One of |
item_category | product category | top level/primary category. You can specify up to 5 categories:
|
item_list_name | list type | List type of list product was in:
*NOTE - Zoned Product Layout must be in use for Ecommerce to work with lists. If set, event-level |
item_brand | brand | Product's brand. NOTE - Currently not standard inclusion from CV ecommerce platform. Must be custom added. |
index | numerical value | position of item presented in list (if applicable) |
price | Monetary nett price of the product, in the specified currency. | If 'hide pricing' is enabled at Role level, this data is not pushed. |
currency | currency of site in 3-letter ISO 4217 format | Multiple currencies per event is not supported. Each item should set the same currency. For GA4, currency can be set at both item and event levels. When item level currency has been set, any event-level setting is ignored. Event level structure: event.currency |
value | Total item value | The same as price, but shown outside of the items array Event level structure: event.value |
user_id | id | The CV site user id (only available for logged in users) |
Anchor ecomclicks ecomclicks
add_to_wishlist
ecomclicks | |
ecomclicks |
The add_to_wishlist event signifies an item was added to the favourites
Event Name | select_item | |
---|---|---|
Variable | Value | Notes |
item_list_name | list type | List type |
product was |
on when selected. See: List Names * NOTE - Zoned Product Layout must be in use for Enhanced Ecommerce to work with lists. |
If set, event-level item_list_name
is ignored.
If not set, event-level item_list_name
is used, if present.
item_brand
brand
Product's brand. NOTE - Currently not standard inclusion from CV ecommerce platform. Must be custom added.
index
numerical value
position of item presented in list (if applicable)
price
Monetary nett price of the product, in the specified currency.
If 'hide pricing' is enabled at Role level, this data is not pushed.
value | Monetary value of product price x quantity | |
items [array] | selected product details | The If multiple products are provided, only the first product will be used. |
user_id | id | The CV site user id (only available for logged in users) |
Anchor ecomcheckout ecomcheckout
begin_checkout
ecomcheckout | |
ecomcheckout |
The begin_checkout event is triggered when the "Begin Checkout" button is clicked from the cart.
Event Name | begin_checkout | |
---|---|---|
Variable | Value | Notes |
currency | currency of site in 3-letter ISO 4217 format | Multiple currencies per event is not supported. Each item should set the same currency. For GA4, currency can be set at both item and event levels. When item level currency has been set, any event-level setting is ignored. |
Item level structure: event.items.currency
Event level structure: event.currency
item_list_name is a parameter that displays the list type name relevant to an event that involves a product list, e.g., view_item_list, item, select_item etc.
List types included and values sent are listed below.
List Type Name
Value
Product Detail
Product Details
Product Category
Product List
Search Results
Search Results
Recently Viewed
Items Recently Viewed
Campaign
Campaign - {0}
Alternate products
Cross Sell
Related products
Upsell
Cart Fast Order Entry
Cart Fast Order
Product Compare
Product Compare
User Favourites
User Favourites
Prior Purchases
Prior Purchases
Cart Lines
Cart Item
view_item_list
The view_item_list event is logged when the user has been presented with a list of items from a certain category or search results, e.g., from a search results, a category list or user's favourites.
Data sent include items,
to specify each product with their details.
Event Name
view_item_list
Parameter
Value
Notes
item_list_name
list type
For list type names, see: List Names
Ignored if set at the item-level.
Event
items [ ]
An array with each product in the list.
Required: yes
See: items event and variables/values for product data sent.
The select_item event signifies an item was selected from a list, i.e., product was clicked. Data is pushed on any click on a product link, e.g., on a search results page or from the user's favourites list. It includes data from the items array with the clicked product as the only product.
Event Name
select_item
Variable
Value
Notes
item_list_name
list type
List type product was on when selected. See: List Names
* NOTE - Zoned Product Layout must be in use for Enhanced Ecommerce to work with lists.
value
Monetary value of product price x quantity
items [array]
selected product details
The items
array with the selected product. See: Items object for product data values.
If multiple products are provided, only the first product will be used.
NOTE - In GA4, you need only specify begin_checkout
. This is effectively equivalent to UA's sending a checkout_progress
event with checkout_step
set to 1 (
'Step 1' of checkout).
Event Name
begin_checkout
currency
currency of site in 3-letter ISO 4217 format
Multiple currencies per event is not supported. Each item should set the same currency.
For GA4, currency can be set at both item and event levels. When item level currency has been set, any event-level setting is ignored.
value
Total cost of products in cart
items
items [ ]
Array contains each product in the cart.
Standard product data (e.g. name, id, category, brand, price) are included for each product. See: items event for product data values.
The purchase
event has two events: transaction (monetary and payment details) + items (array with the purchased products). Currently, only transaction details are included.
Event Name
purchase
Variable
Value
Event
transaction
transaction_id
sales order number
generated from your system
value
total order value
tax
total tax value
will depend on whether inc or exc tax has been set
shipping
total shipping value
currency
currency of site in 3-letter ISO 4217 format
For GA4, currency can be set at both item and event levels. When item level currency has been set, any event-level setting is ignored.
value | Monetary value of all products | Total cost of products in cart |
coupon | Campaign name | If name of any promotion |
items | items [ ] | Array contains each product in the cart.
|
user_id | id | The CV site user id (only available for logged in users) |
Anchor ecomtrans ecomtrans
purchase
ecomtrans | |
ecomtrans |
The purchase event is triggered when the cart is checked out
Event Name | purchase | |
---|---|---|
Variable | Value | Notes |
Event | transaction | |
transaction_id | sales order number | generated from your system |
value | total order value | |
tax | total tax value | will depend on whether inc or exc tax has been set |
shipping | total shipping value | |
currency | currency of site in 3-letter ISO 4217 format | Event level structure: event.currency |
user_id | id | The CV site user id (only available for logged in users) |
Anchor ecomaddtocart ecomaddtocart
add_to_cart
ecomaddtocart | |
ecomaddtocart |
The add_to_cart event is triggered every time a user successfully adds items to cart. This is recommended for businesses with online sales.
These parameters are included.
Event | add_to_cart | |
---|---|---|
Parameter | Value | Notes |
|
| monetary value of the event* * |
currency | Currency code of the current event, in 3-letter ISO 4217 format. | If set, item-level Event level structure: event.currency |
user_id | id | The CV site user id (only available for logged in users) |
Array | Items [ ] | An array with each product and standard product data (e.g. name, id, category, quantity, brand, price) included. See: items for product data values. Product data can also include the *NOTE - Zoned Product Layout must be used in order to collect data from lists. See: List Names. |
Anchor ecomaddtocart ecomaddtocart
add_payment_info
ecomaddtocart | |
ecomaddtocart |
The add_payment_info event is triggered every time a user successfully adds payment info during checkout.
These parameters are included.
Event | add_to_cart | |
---|---|---|
Parameter | Value | Notes |
|
| monetary value of the event* * |
currency | Currency code of the current event, in 3-letter ISO 4217 format. | If set, item-level |
payment type | They type of payment | Where the payment originated from:
|
step | Number 4 | The number of the step from the checkout flow, for this event it's 4 |
user_id | id | The CV site user id (only available for logged in users) |
Array | Items [ ] | An array with each product and standard product data (e.g. name, id, category, quantity, brand, price) included. See: items for product data values. Product data can also include the *NOTE - Zoned Product Layout must be used in order to collect data from lists. See: List Names. |
Anchor ecomaddtocart ecomaddtocart
add_shipping_info
ecomaddtocart | |
ecomaddtocart |
The add_shipping_info event is triggered every time a user successfully adds payment info during checkout.
These parameters are included.
Event | add_to_cart | |
---|---|---|
Parameter | Value | Notes |
|
| monetary value of the event* |
value
.* currency
is required if you set value
.
currency
Currency code of the current event, in 3-letter ISO 4217 format.
currency
is ignored. If not set, currency from the first item in items
is used.* If you set
value
then curr
ency
is required for revenue metrics to be computed accurately. is typically required for meaningful reporting. If you mark the event as a conversion then it's recommended you set * | ||
currency | Currency code of the current event, in 3-letter ISO 4217 format. | If set, item-level |
payment type | They type of payment | Where the payment originated from:
|
step | Number | The number of the step from the checkout flow, for this event it's 1 |
user_id | id | The CV site user id (only available for logged in users) |
Array | Items [ ] | An array with each product and standard product data (e.g. name, id, category, quantity, brand, price) included. See: items for product data values. Product data can also include the *NOTE - Zoned Product Layout must be used in order to collect data from lists. See: List Names. |
Anchorecomremovefromcart ecomremovefromcart
removeremove_from_cart
ecomremovefromcart | |
ecomremovefromcart |
The remove_from_cart event is triggered whenever a product is successfully removed from the shopper's cart.
NOTE - This can be a whole line deletion, or a decrease in quantity. Both actions are sent as 'Remove From Cart' data.
Event | remove_from_cart | |
---|---|---|
Parameter | Value | Notes |
value | value | value of order line (product x quantity) |
currency | currency code | currency code for the current account |
array | items [ ] | An array containing each product removed with its details (e.g. name, id, category, quantity, brand |
You can add rich snippets to include key summary details about a website page when it displays in Google search results. An example might be to show ratings for a product's page on your site.
Learn more: https://developers.google.com/search/blog/2009/05/introducing-rich-snippets, price) included. See: items event for product data values. |
Anchor | ||||
---|---|---|---|---|
|
You can add rich snippets to include key summary details about a website page when it displays in Google search results. An example might be to show ratings for a product's page on your site.
Learn more: https://developers.google.com/search/blog/2009/05/introducing-richsnippets
Anchor | ||||
---|---|---|---|---|
|
On Analytics Feature Management page, when the "Track Logged Out Users" is toggled on, then any guests who visit the site and aren't logged in will be assigned a randomly generated user_id for their session, which is pushed to Google Tag Manager. Otherwise, If the "Track Logged Out Users" toggle is left unchecked, then the user_id pushed will be "NULL", ensuring when a user logs out any future events of theirs aren't assigned to the previously logged in user_id.
Related Resources
Content by Label | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|