Google Tag Manager for Web
This topic provides a step by step guide on how to add the Moments tags to your website using Google Tag Manager. Google Tag Manager lets you add, remove, and edit tags on your website easily, without changing the website's code.
Marigold provides 6 different templates that can be uploaded to Google Tag Manager. These templates can then be used to create your tag definitions:
-
Marigold - Include signals SDK.tpl is a mandatory template that needs to be uploaded to Google Tag Manager and allows to initialize the SDK on your website.
-
Marigold - Abandon Booking Signals.tpl is used to track bookings that have started but not completed. Upload this template if you want to track bookings;
-
Marigold - Abandon Cart Signals.tpl is used to track abandoned carts.
-
Marigold - Abandon Game Signals.tpl is used to track games that have been started but not finished;
-
Marigold - Abandon Survey Signals.tpl is used to track surveys that have been started but not completed;
-
Marigold - Behavior Signals.tpl is used to track sign ins and sign outs.
Requirement: You need to the have a Google Tag Manager account to be able to upload and configure the templates. Check out this topic for more details on how to do this.
Step1: Import the required templates
1. First, download the Marigold templates.
Note: The Include Signals SDK.tpl is a mandatory template that must always be imported. Depending on the specific events for which you want to send signals, ensure that you also import the relevant templates associated with those events.
2. In Google Tag Manager(GTM), go to the Accounts overview and select your account.(https://tagmanager.google.com/#/home)
3. In the left side menu, go to the Templates section:
All templates currently available are listed. Clicking an existing template will display the template properties.
4. Import a new template by clicking the New button:
5. The Template editor is shown. Click the 3 dots in the upper right corner and select Import.
6. Select the template from the list of files downloaded in step1.
7. The Template Editor is updated with the name and description of the imported template.
Note: In case an updated version of the template is available, you need to update the existing template, by opening the template and then in the template editor perform an import of the updated template.![]()
8. On the Fields tab of the imported template, you can check the mandatory and optional data that is configured in the template.
For example, for the Include Signals SDK the following fields are included:
For the Abandon Cart template for example, the following fields are included:
Step 2: Create tags based on the templates
Once the templates have been imported, you need to create Tags based on these template.
The Include Signals tag is mandatory. This tag needs to be added to every page from which a signal needs to be sent. It ensures the required script to send the signals is loaded on the page.
All other tags depend on what you want to track on the website.
1. Go to the Tags entry in the left menu. An overview of all existing tags is displayed. Click New.
2. In the Tags editor, enter a name for this tag and next click the Tag Configuration section.
3. Choose a tag type from the list on the right. Select one of the custom Marigold templates that you have imported before. (example Abandoned Cart Signals):
4. The Tag configuration panel is displayed where you can fill out all fields configured in the template.
For the Include Signals Tag, following fields are listed. 
The Signals SDK URL depends on the region:
EU URL: https://mmx-eu-signals-js.s3.eu-west-1.amazonaws.com/eu/public/index.js
US URL: https://mmx-us-signals-js.s3.us-east-1.amazonaws.com/us/public/index.js
JP URL: https://mmx-jp-signals-js.s3.ap-northeast-1.amazonaws.com/jp/public/index.js
The Signals API URL depends on the region as well:
EU URL: https://api-eu.signals.engageplatform.com
US URL: https://api-us.signals.engageplatform.com
JP URL: https://api-jp.signals.engageplatform.com
The Signals SDK authentication Key can be retrieved from the Audience configuration in the Moments application:
For the Abandon Cart Signals Tag, the following fields are listed
CartID — The unique identifier for the cart. This is specific to each ecommerce platform.
idType — The type of unique identifier, email or external.
Email — This is optional. However, signals are only sent when the email address of the user is known. This email address can also be passed on through another method, such as a signin.
Customer Specific Identifier — The unique external identifier of the consumer.
Cart items — This is mandatory and contains an array of items.
Profile Attributes — This is optional and is an array of user profile attributes.
Event Attributes — This is optional and is an array of event attributes.
Note: For a full overview of all optional and mandatory fields and their structure for each one of the tags based on the Marigold templates, check out the SDK documentation:
Abandon Booking
Abandon Survey
Abandon Game
Abandon Cart
Behavioral
Note: You can use variables to fill out the mandatory and optional fields here. There are a series of built-in variables, but you can add user-defined variables when needed. These user-defined variables will be filled with information that comes from the website.
Example: In our demo environment, the Signals - Add to cart tag is based on the abandon Cart SDK template. The following fields are listed:![]()
In this example the Cart items field is using the following variable: {{Product (Add To Cart)}}
When you have a look at this variable for our demo environment, the content is as follows:![]()
This variable is an array in which information on the sku, quantity, price, name and attributes is retrieved from the website and passed on through this variable to the Signals API.
(For more information on user-defined variables, please check out this topic on Google Tag Manager)
5. Next, in the Tag sequencing section, make sure that the Include Signals tag is selected in the configuration of any of the other tags. This Include Signals tag must always be executed first.
6. Last, a trigger can be linked to this tag. This trigger defines when the data needs to be sent to the signals API.
Example: Events regarding items being added to the cart, need to be sent when the Add to cart button is clicked.![]()
(For more information on triggers, check out the following topic on Google Tag Manager.)
