For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Setting Up Google Tag Manager

Google Tag Manager is a tag management system (TMS). It lets you update tags on a website or mobile app. Tags are tracking codes and related code fragments.

After adding Tag Manager code, deploy analytics and measurement tags from its web interface.

After installing Tag Manager, use its web interface to:

  • Set up tracking tags.

  • Establish triggers that fire tags during specific events.

  • Create variables that simplify tag configurations.

A collection of tags, triggers, variables, and related configurations installed on a given website or mobile app is called a container. A Tag Manager container can replace all other manually-coded tags on a site or app, including tags from Google Ads, Google Analytics, and EXADS Pixel Tracking.

1. Account Creation

1.2. After creating the account, Google Tag Manager displays its script. Add this code to your landing page. It will not work until you configure a Tag and Trigger.

banner

2. Setting up the Variable

Create a variable to pass {conversions_tracking} from the campaign URL to the postback URL. TO create a variable, click Variables, then User-Defined Variables and New:

Variable

Pass this value through the URL or a 1st Party Cookie. If you can pass the {conversion_string} string to the URL where the conversion happens, then we recommend using URL. Otherwise, we suggest using 1st Party Cookie.

2.a: URL Variable

2.a.1. - The URL Variable method is the easiest and quickest method for integration. Click on “Variable Configuration” and select “URL”:

URL Variable

2.a.2. - Select "Query" as Component Type and add "tag" in the Query Key:

Query

2.a.3. - Save the Variable.

2.b.1. - This setup allows you to have access to additional Triggers and set ups, but in order to use it you will have to fetch the {conversions_tracking} string from the Campaign URL and store it in a Cookie.

You will have to place the following code in the URL that contains the {conversions_tracking} string:

If your landing pages use HTTPS only, you can also add ; Secure to the cookie.

2.b.2. - Click on “Variable Configuration” and select “1st Party Cookie”:

1st Party Cookie

2.b.3. - In “Cookie Name”, add “tracking”:

Cookie Name

2.b.4. - Save the Variable.

3. Setting up the Trigger

The trigger determines when Google Tag Manager fires the tag. This guide covers Page View and Link Click triggers. Link Click requires the 1st Party Cookie variable.

Click "New" on the "Triggers" page and then select "Page View" in the Trigger Type list:

Trigger Type

3.a. Page View

3.a.1. - Select “Page View” as trigger type:

Page View

3.a.2. - "Some Page Views" and, in "Page URL", add the Domain that should fire this tag:

Page View

While you do not have to specify the full URL, make sure that this URL is the same as the one that contains the {conversions_tracking} string.

3.a.3. - Save the trigger.

3.b.1. - Select “Just Links” as trigger type:

Link Click

3.b.2. - In the trigger settings, select “Some Link Clicks”, then determine the condition in which the click would fire the pixel.

For instance, if the tag will be fired once the user clicks on a “Complete registration” link, then you should put the URL of the “registry complete” page as a Page URL condition:

Link Click

For a purchase, use purchase_complete when the thank-you page URL contains it:

Trigger Condition

As an additional filter to make sure all postbacks you sent are valid, you can enable “Check Validation” and add a condition where the {conversions_tracking} variable must not be empty, as shown below:

Check Validation

3.b.3. - Save the trigger.

4. Setting up the Tag

The tag calls the postback URL. To create the tag, click New in Tags and select Custom Image as the tag type:

New Tag

Then, in "Image URL", add the following URL:

syndication.example.com to be substituted with the conversion domain used by your ad server.

Make sure to disable Cache Busting and substitute the GOAL_ID value with the Goal ID from the advertiser's account.

Then, click on the button next to the Image URL:

Tag Configuration

Select the Variable you created in step 2.

Variable

Now your Image URL should look like this:

Lastly, select the Trigger you created in step 3:

Trigger

5. Submit and publish Google Tag Manager configuration

Submit and publish the configuration.

Publish

Now, the request to the Postback URL should be seen in the website. When this Postback URL is requested, a conversion should be registered in the campaign:

Campaign
Campaign
Campaign

Important notes on this guide

  • With Postback URL tracking, the Admin user must add the "conversions_tracking" tag in the campaign URL. The information provided by the "conversions_tracking" tag must reach the website where the Google Tag script is located, otherwise the variable won't pick up the information from the tag. This is why we advise to use "Page View" as trigger instead of using other triggers: while it is possible to send the string from "conversions_tracking" through other means, it is much easier and more reliable to get it from the campaign URL.

  • This integration will generate a 1x1 blank image on the website. Since it is an image tag, it will be affected by any CSS rules the client might have on the website, so make sure that this image does not get any styling. Otherwise, a broken/blank image might be displayed on the site.

  • Currently there is no way to track conversions with Adblock enabled because Adblock blocks Google's GTM script.

Troubleshooting

Conversions not being fired

Occasionally, pixels do not get fired, even when the script has been added on the site:

banner

This usually happens because Google strips out the ID from the Goal, preventing it from associating the user with a specific account goal. In order to solve this issue, you will have to add the following script in the "Tag Configuration" section from Google Tag Manager (Step 2.2 above):

banner

Make sure to replace 'XXX_GOAL_ID_XXX' with the ID from the Goal you want to use.

Last updated

Was this helpful?