Skip to main content

Introduction to Google Tag Manager

Google Tag Manager (GTM) is a useful tool that allows you to manage and deploy marketing tags, snippets of code or tracking pixels on your website or mobile app without having to modify the code. With the GTM integrated, you have multiple tags stored in one place and therefore it becomes handy for the Marketeer to manage all the codes on their own. There are three main parts to GTM:
  • Tags – Snippets of JavaScript or tracking pixels
  • Triggers – This tells GTM when or how to fire a tag
  • Variables – Additional information GTM may need for the tag and trigger to work

Prerequisites

Ensure that you have created your GTM account and installed the GTM container to use the Zeotap IDP Tag Template. To know more about how to set up and install the GTM, refer to Setting up and Installing Tag Manager.

Overview of Zeotap IDP Tag Template

The Zeotap IDP Tag is available as a custom template on GTM for easy integration. This is a JavaScript (JS) tag that is used to identify the user’s IDP cookie value based on a given email address or phone number. This is an asynchronous process and does not affect the loading of the site or the end-user experience. The Zeotap IDP tag requires a data layer to be set up on your websites. This data layer is used for capturing all the information required for IDP Cookie identification. Note that all these details about the IDP cookie are sent to Prebid.
GTM’s custom templates allow you to write your own tag and variable definitions so that others within your organization can use them alongside the built-in tag and variable templates. These custom templates allow you to build a user interface around the custom code you might want to run on your website using GTM. This user interface comprises text input fields, settings, tables, labels, drop-down menus and so forth.

Adding the Zeotap IDP Tag Template

You can add the Zeotap IDP Tag Template using one of the following methods:

Method 1

1
Log into your GTM account and click Templates from the left menu.
2
Under Tag Templates, click Search Gallery on the top-right corner.
3
Search and choose Zeotap ID+ Tag from the list.
4
Click Add to your workspace to add the Tag Template for further usage.

Method 2

1
Check with your Zeotap Product Operations Manager to get the .tpl file.
2
Log into your GTM account and click Templates from the left menu.
3
Under Tag Templates, click New on the top-right corner.
4
In the top-right corner, click the vertical ellipses and select Import.
5
Select the .tpl file shared in step 1 above.
6
Name the template as Zeotap ID+ Template and save it for further usage.

Adding the Tag

Once you have added the Tag Template, the next step is to add the tag. Perform the following steps to add the Tag:
1
Log into your GTM account and click Tag from the left menu.
2
Click New and name the tag descriptively. For example, Zeotap IDP+ Tag.
3
Click Tag Configuration and search for Zeotap IDP+ Tag. The Tag is listed under the Custom tab.
4
Click Zeotap ID+ Tag. To configure the tag, follow the steps mentioned below.

Configuring the Tag

The process of configuring a Tag is divided into the following sections:

Configuring the Initialisation Settings

Under the Initialisation section, enter the following details to configure the initialisation options:
  • Partner ID – Zeotap provides this ID after enabling ID+ for your organisation. Ensure that you add the ID properly.
  • Consent Method – The Zeotap IDP SDK has the following two options that can be used to determine the consent actions:
    • Default Opt-in – This option sets the optOut option to false and is used to record events. Choose this option to fire the tag only for the consented users.
    • Check TCF CMP – This option sets the useConsent and checkForCMP options to true. The JS automatically checks for the presence of the cmp.js script and the __cmp variable in the global scope. The JS also queries the TCF API to fetch the latest Publisher consent before recording the events on each JS load.

Configuring the Login and Identities Settings

Under the Login and identities settings section, enter the following details to configure the login and identities settings:
  • Event Key – This is the key against which the login event names are stored in the dataLayer object. You can choose not to add this key if you are using the GTM’s default key.
  • Login Event – Specify the dataLayer event fired on user login. For example, setUserIdentities.
  • Capture email – Use this checkbox to specify if email address must be used for ID+ calls. If selected, the corresponding variable must be added in the next input box.
  • Email variable – Specify the variable to pick up the email address from. The same email address is hashed to sha256 and is used to retrieve the IDP cookie against the email address.
  • Capture cell phone number – Use this checkbox if cell phone number must be used for ID+ calls. If selected, the corresponding variable must be added in the next input box.
  • Cellphone number variable – Specify the variable to pick up the phone number with the country code from. The same phone number is hashed to sha256 and is used to retrieve the IDP cookie against the cellphone.
  • Are your identities hashed? – For ID+ calls, the email address in lowercase and cell phone number with country code must be hashed to sha256. If this checkbox is selected, then we assume that the email address and/or phone number variables are already in the hashed format as per guidelines. If unselected, then we treat them as raw values and perform the hashing before the ID+ calls.

Configuring the Advanced Settings

All the options available under the Advanced Settings section, function as usual. However, take a note of the following two options:
  • Tag firing options – Choose the Once per event option from the Tag firing drop-down menu. At this moment, we only support this option.
  • Additional Tag Metadata – This section is not applicable for ID+. Therefore, you need not make any selections here.

Setting Up the Trigger

The IDP tag is recommended to have triggers during the login event so that you can attach triggers only for the login event key. You can either add a preconfigured trigger to a tag or create a trigger within the tag. The section below explains the two methods in detail.

Method 1

If you want to fire the tag on the login event, then trigger ‘Custom event’ by performing the following steps:
1
Click Trigger Configuration from your left menu.
2
Click New to add a trigger.
3
Add a descriptive name to the trigger.
4
Edit the Trigger Configuration section and search for Custom Event.
5
Type your ‘Login event’ as the event name. For example, setUserIdentities.
6
Select the All Custom Events radio button. The trigger is set for the login event only.

Method 2

You can also set a trigger to a tag while configuring it. Perform the following steps to set a trigger to a tag from the Tag Configuration section.
1
Navigate to the Tag Configuration section of the tag to which you want to attach a trigger.
2
Click under the Triggering section.
3
In the Choose a trigger window that appears click
4
Add a descriptive name to the trigger.
5
Edit the Trigger Configuration section and search for Custom Event.
6
Type your ‘Login event’ as the event name. For example, setUserIdentities.
7
Select the All Custom Events radio button. The trigger is set for the login event only.

Validating the Configured IDP Tag 

After you have added the Zeotap IDP Tag, configured the same and set the trigger to perform the following steps to evaluate how it works:
1
Click Tag from the left menu. Of all the tags that are listed, ensure that your tag is in the active state and has not been paused.
2
Click the Preview button that appears on the top right corner. You are taken to the Tag Assistant page.
3
In the Google Tag Assistant window that appears, enter the website where you have integrated the GTM and then click Start. Refer to the image below from a sample website.
4
You are redirected to the website URL that you had entered. Log into the website.
5
After successfully logging into the website, right-click on the web page and click Inspect.
6
Go to the Console tab of the DevTools window that opens and under dataLayer look for the login event name that you have configured. The image below shows the event name setUserIdentities.
7
Go back to the Tag Assistant window and click Continue.
8
Under Tags Fired you can find the tag that was fired. Therefore, the tags were fired based on the trigger set for the login event named setUserIdentities. The tag contains the user’s IDP cookie detail for a given email address or phone number that is used for logging into the website.
Last modified on February 26, 2026