Version 3.x of VTEX’s Google Tag Manager (GTM) app tracks the entire user’s journey through the store, from viewing a product to purchasing it, via events triggered by the variable ecommerceV2
.
New and rearranged properties were added to the product schema to represent on the events and to track the user's journey and keep product information consistent across all areas of the store.
GTM 3.x property | Type |
---|---|
id | Renewed property |
variant | Renewed property |
name | Renewed property |
quantity | Unchanged property |
price | Unchanged property |
category | Unchanged property |
brand | Unchanged property |
dimension1 | New property |
dimension2 | New property |
dimension3 | New property |
For more details on these properties, go to the section Product schema
Follow the steps below to update the GTM container and fetch the data from the ecommerceV2
variable.
Before you start
For Google Analytics (GA) to read the data from the variable ecommerceV2
, you will need a GA variable for the store’s checkout responsible for tracking the Checkout and Order Placed pages.
Create the store's checkout variable by following the step For the store’s checkout in the Setting up Google Tag Manager documentation.
Step by step
Creating ecommerceV2
- Log in to your GTM account and click on the GTM container you want to work with.
- Click on Variables, and click on’ New’ in the User-Defined Variables section.
- Replace the
Untitled Variable
value withecommerceV2
. - Click on Variable Configuration box.
- Then, on Page Variables, click on Data Layer Variable.
- In the
Data Layer Variable Name
field, typeecommerceV2
. - Click on
Save
:

Using the ecommerceV2
variable on the Google Analytics tag
- Open the store’s checkout variable by clicking on Variables and in the User-Defined Variables section select it.
- Click on the Variable Configuration box and expand the More Settings menu.
- Then, click on Ecommerce and check the Enable Enhanced Ecommerce Feature option.
- Disable Use data layer option and, on the Read data from variable field, select
{{ecommerceV2}}
. - Click on
Save,
and you should have a variable as the example below:
After executing the steps described, your Google Tag Manager container is ready to support the GTM 3.x major. Check your Google Analytics to see the impact on the results.
Updating Google Tag Manager settings
After installing the Google Tag Manager app 3.x major, you must update the app's settings to guarantee that previous data won't be be lost after the upgrade. To update the app's settings:
- Access the following link:
https://{myaccount}.myvtex.com/admin/apps/vtex.google-tag-manager@3.3.1/setup/
. Do not forget to change the value in brackets for your account name. - In the field Google Tag Manager, type the GTM ID.
To find your store’s GTM ID, first, you need a container to the Tag Manager account. If you do not have one follow the create a new account and container tutorial and after find the GTM ID in The Container ID column of the container.
- Click on
SAVE
.
Product schema
To make the product information consistent across all store areas and help capture the entire user's journey on the store, Google Tag Manager 3.x. includes Enhanced Ecommerce properties to the product data schema as events. These properties enable stores to provide additional information, such as product printing, promotion, and sales data.
Prop name | Description |
---|---|
id | Product ID - Previously SKU ID. |
variant | SKU ID - Previously SKU Name. The variant of the product, e.g., Rebel pink. |
name | Product Name - Previously Product Name or SKU Name. |
quantity | Product quantity |
price | Product price. |
category | Product category, e.g., Apparel. |
brand | Product brand. |
dimension1 | Product Reference ID. |
dimension2 | SKU Reference ID. |
dimension3 | SKU Name (does not include the Product Name). |
The dimension1
, dimension2
, dimension3
properties are custom dimensions that you can use to collect and analyze data that Google Analytics does not automatically create.
For more information about custom dimensions and Enhanced Ecommerce, refer to Custom dimensions and metrics and Google Enhanced ecommerce official guide respectively.