Introduction
To simplify the installation and configuration of iAdvize on your site, we have published 3 tags in the Google Tag Manager Community Template Gallery.
If you haven’t added them to your Google Tag Manager Workspace yet, you can do so by adding the following 3 tags: Main Tag, Transaction Tag and Custom Data tag.
If you’d like to learn more about our three tags: what they mean, how they work, and how they relate to one another, we invite you to read our dedicated introduction article.
Configuration
To start the configuration, sign in to Google Tag Manager then open your workspace.
Prerequisite: add the iAdvize tags to your workspace
If you haven’t done it yet, let’s add the 3 iAdvize tags to your workspace.
- In your Google Tag Manager workspace, click “Templates” in the left menu, then click the “Search Gallery” button:
- In the right-hand side panel that opens, click the magnifying glass icon and search for “iAdvize”:
- Click each of the 3 tags and add them to your workspace by clicking the “Add to workspace” button.
- Then click the “Add” button in the next window for each of the 3 tags:
Main tag
Tag configuration
- Click “Tags” in the left menu then click “New”:
- In the window that opens:
(1) give your tag a name, for example “iAdvize - Main tag”
(2) click “Tag Configuration”
(3) select the iAdvize main tag (iAdvize - Main tag) you previously added to your workspace
- Fill in your iAdvize tag settings:
(1) your iAdvize project id (usually a 4-digit numeric identifier)
(2) optionally, you can force the language in which iAdvize will be displayed
Trigger configuration
- We will now define the trigger conditions for the iAdvize main tag.
(1) Click “Triggering” to select a trigger in the new window
(2) Select “Initialization - All Pages” so that the iAdvize main tag fires at each page initialization on your website
Finally, click the “Save” button to save the iAdvize main tag configuration:
If you are subject to data protection regulations (such as GDPR in Europe) and you don’t have a CMP (Consent Management Platform) compatible with iAdvize (Didomi, Axeptio, One Trust or Trust Commander), then you must condition the firing of the iAdvize tag on the visitor’s cookie consent. You will therefore need to adapt the trigger to your situation.
Transaction tag
Prerequisite: create the trigger and variables
You may already have the required triggers and variables in your Google Tag Manager workspace.
Indeed, iAdvize can rely on the events and variables fired and pushed by your ecommerce site through the Data Layer.
The guide below uses Google Analytics 4 recommended events as an example.
You MUST adapt the configuration to your own events and data-layer variables
Create the transaction trigger
- Click (1) “Triggers” in the left sidebar, then (2) “New” to start creating a new trigger
- (1) Name your trigger — we recommend “iAdvize - CE - purchase” (CE stands for “Custom Event” and “purchase” is the event name we’ll use)
(2) Then click “Trigger Configuration” to open the list of available triggers
(3) Click “Custom Event”
-
(1) In the event name, enter “purchase”, because this
is
the event name we want to watch for in the Data Layer
‼️ Keep in mind that event names may differ in your own Data Layer, so be sure to use the one that matches your implementation ‼️
(2) Then click the “Save” button to save your trigger
Create the transaction ID and amount variables
- (1) Click “Variables” in the left sidebar, then (2) “New” to start creating a new variable
- (1) Name your variable — we recommend “iAdvize - DLV - Transaction ID” (by convention, “DLV” stands for “DataLayer Variable”)
(2) Then click “Variable Configuration” to open the list of available variables
(3) Select “Data Layer Variable”
- (1) Enter the Data Layer variable name that contains the transaction ID: “ecommerce.transaction_id”
‼️ Keep in mind that variable path may differ in your own Data Layer, so be sure to use the one that matches your implementation ‼️
(2) Then click “Save” to save your variable.
Then do the same for a second variable that you (1) will name “iAdvize - DLV - Transaction Amount”, which is also a (2) “Data Layer Variable”, and whose value (3) is “ecommerce.value”
‼️ Keep in mind that variable path may differ in your own Data Layer, so be sure to use the one that matches your implementation ‼️
Tag configuration
- Click “Tags” in the menu then “New” to start configuring the iAdvize transaction tag
- In the window that opens:
(1) give your tag a name, for example “iAdvize - Transaction tag”
(2) click “Tag Configuration”
(3) select the iAdvize transaction tag (iAdvize - Transaction tag) you previously added to your workspace
- (1) Set the two variables by clicking the brick icon (2) to select the “iAdvize - DLV - Transaction ID” and “iAdvize - DLV - Transaction Amount” variables we created earlier
Trigger configuration
- (1) Click “Triggering” to open the list of available triggers
(2) Then select the “iAdvize - CE - purchase” trigger we created earlier
- Finally, click the “Save” button to save.
Custom data tag
This tag sends iAdvize real-time information about the product page your visitor is viewing, information about your visitor, or any other contextual data you want to attach to iAdvize conversations.
In the following example, we will focus only on sending the ID of the product page your visitor is viewing. This allows iAdvize to personalize engagement notification content and also helps the iAdvize AI Shopping Assistant answer questions about the product the visitor is currently viewing.
Prerequisite: create a trigger and a variable
You may already have the required triggers and variables in your Google Tag Manager workspace.
Indeed, iAdvize can rely on the events and variables fired and pushed by your ecommerce site through the Data Layer.
The guide below uses Google Analytics 4 recommended events as an example.
You MUST adapt the configuration to your own events and data-layer variables
Create a trigger for product page/view
- Click (1) “Triggers” in the left sidebar, then (2) “New” to start creating a new trigger
- (1) Name your trigger — we recommend “iAdvize - CE - view_item” (CE stands for “Custom Event” and “view_item” is the event we’ll use)
(2) Then click “Trigger Configuration” to open the list of available triggers
(3) Click “Custom Event”
- (1) In the event name, enter “view_item”, because this is the event name we want to watch for in the Data Layer.
‼️ Keep in mind that event names may differ in your own Data Layer, so be sure to use the one that matches your implementation ‼️
(2) Then click the “Save” button to save your trigger
Create a variable containing the viewed product ID
- (1) Click “Variables” in the left sidebar, then (2) “New” to start creating a new variable
- (1) Name your variable — we recommend “iAdvize - DLV - Product ID” (by convention, “DLV” stands for “DataLayer Variable”)
(2) Then click “Variable Configuration” to open the list of available variables
(3) Select “Data Layer Variable”
- (1) Enter the Data Layer variable name that contains the product ID: “ecommerce.items.0.item_id”
‼️ Keep in mind that variable path may differ in your own Data Layer, so be sure to use the one that matches your implementation ‼️
(2) Then click “Save” to save your variable.
Tag configuration
- Click “Tags” in the menu then “New” to start configuring the iAdvize custom data tag
- In the window that opens:
(1) give your tag a name, for example “iAdvize - Custom Data tag”
(2) click “Tag Configuration”
(3) select the iAdvize custom data tag (iAdvize - Custom Data tag) you previously added to your workspace
- (1) Set the variable by clicking the brick icon (2) to select the “iAdvize - DLV - Product ID” variable we created earlier
Trigger configuration
- (1) Click “Triggering” to open the list of available triggers
(2) Then select the “iAdvize - CE - view_item” trigger we created earlier
- Finally, click the “Save” button to save