The iAdvize GTM template - Transaction tag has been updated. It allows you to send iAdvize the details of products included in each order, directly from Google Tag Manager. This configuration is optional but highly recommended: without it, the iAdvize sales report is limited to the overall order amount. With it, you unlock detailed product analysis that significantly enriches your data.
What this brings to the sales report
By sending the details of the ordered products, you gain access to much more precise information in your iAdvize Sales Report:
- Which products were purchased after a conversation with the Shopping Assistant
- The revenue generated per product, to identify your best performers
- The correlation between discussed products and purchased products, to measure the relevance of your Shopping Assistant’s recommendations
Identify the variable that contains your ordered products
Do not copy the examples below as they are. The values shown are generic examples. Your Data Layer is specific to your site and your implementation. If you are unsure of the value to use, please consult your technical team or agency.
You need to identify, or create, a GTM variable that contains the array of ordered products. This array must be available in your Data Layer at the moment the order is confirmed.
If you are using GA4-type events, this array is generally found in ecommerce.items. But this may vary depending on your configuration.
How to create this variable in GTM:
- Go to Variables > New
- Choose the type Data Layer Variable
- Give it a meaningful name (example: iAdvize - DLV - Transaction Items)
- Enter the path to your products in the Data Layer
The path to enter depends on your own Data Layer. Do not enter an example path without verifying that it matches your implementation.
Fill in the "Transaction items" field in the tag
Start by updating the iAdvize - Transaction tag template from the Google Tag Manager community template gallery.
In the transaction tag configuration, you will find a new section "Power up your sales reports" with a field "Transaction items". This field allows you to send the details of ordered products to iAdvize.
Once your variable is created, open the configuration of the iAdvize - Transaction tag and select your variable in the Transaction items field.
My product properties have different names?
The products in your Data Layer must contain three pieces of information: the product ID, the quantity ordered, and the unit price.
Do your products contain other information? No worries. The iAdvize template will automatically extract only what it needs: the product ID, quantity, and unit price. You do not need to modify the structure of your existing data.
By default, the template expects these three pieces of information to be named according to the GA4 standard:
-
item_idfor the product ID -
quantityfor the quantity ordered -
pricefor the unit price
If your products use different property names, tick the box:
☑️ My item properties use non-GA4 names (item_id, quantity and price)
Three fields will then appear. Fill in the exact names as they appear in your Data Layer.
Example:
In our dataLayer, the product ID is stored in a property named "product_id", the quantity in "qty" and the price in "price".
So I have "product_id" and not "item_id", and "qty" instead of "quantity". "price" matches the default expected value.
items: [
{
product_id: 'ABC_702810',
qty: 2,
price: 39.9
},
{
product_id: 'DEF_604064',
qty: 1,
price: 19.9
},
]
I will therefore tick the box and enter "product_id" and "qty" in the corresponding fields. I leave the "price" field empty because I do not need to customise it.
The values to enter depend on your own configuration. If you do not know the names used in your Data Layer, check with your technical team before filling in these fields.
Check your implementation with the GTM debug tool
Before publishing your changes, we recommend testing your configuration using the preview tool built into Google Tag Manager.
How to proceed:
- In GTM, click on Preview (top right)
- Enter your site URL and navigate until you perform a test order
- In the debug interface, click on the event that triggers your transaction tag
- Locate your Transaction items variable and verify that it contains an array of products with the correct values
What you should see: the variable should not display its name between curly braces (e.g.: {{iAdvize - DLV - Transaction Items}}), but the array of products corresponding to your test order, with the expected IDs, quantities and prices.
If the variable still displays its name between curly braces, it means it is not resolving correctly. Check the path entered in your data layer variable, or consult your technical team.
A question about your configuration?
If you have any doubts about the configuration to adopt, do not attempt random configuration. Contact your technical team, your agency, or iAdvize support.