Integrate Google Tag Manager

How to setup Google Tag Manager

Here you’ll find a step-by-step guide for setting up Google Tag Manager in combination with TRUENDO.

Step 1

Download our Tag Manager JSON file. This file contains the necessary tags, triggers and variables to make TRUENDO work with the Google Tag Manager.

Download TRUENDO-GTM JSON

Step 2

Now you have to import the file to Workspace.

  1. Go to the Admin Tab and click on Import Container GTM Admin Screenshot

  2. Then upload the TRUENDO-GTM.json file you downloaded before.

  3. Set the Workspace to Default Workspace.

  4. Set the import options to Merge.

Important Note: Do NOT set your import options to Overwrite. This would remove all your existing tags, triggers and variables.
  1. Click on Confirm.

GTM Import Screenshot

Step 3

Now we have to add your Site ID to the TREUNDO tag.

  1. Login to Console and go to Integration and to the Integrate into Website tab.
  2. Copy the Site-ID (This is the long number next to data-siteid).
  3. Back at the Google Tag Manager under the Tags tab, open your TRUENDO tag.
  4. In here you have to replace data-siteid at the bottom of the code with your Site ID. Remove the YOUR SITE ID text and paste the ID you copied from the console, here.

TRUENDO Cookie Variable Screenshot

Step 4 (Special Case)

Some of your tags might have triggers that fire at very specific events (e.g.: a tag that fires on certain scroll depths), as opposed to on every page. In this case you need to connect that event with TRUENDO’s categories. To do that we have to make sure that each Trigger has an additional condition to only fire when the category is set to true.

  1. Go to Triggers.
  2. Click on the triggers then edit and set This trigger fires on to Some Custom Events or Some Pages if it is not so already.
  3. Then set the condition to: TruendoCookie > contains > "[category]":true and press Save.

Example:

TruendoCookie > contains > “statistics”:true

Scroll Depth Example

  1. Do points 1-3 for every trigger on the list.

Step 5

The last step is applying these triggers to the other tags (E.g. Google Analytics, Hotjar, Outbrain, etc.) you want to control. Every tag that is triggered on all pages gets the trigger that applies to their category. Tags that use special events retain those triggers, since we have modified those to work with TRUENDO.

To do this add the Custom Event trigger (each trigger has the name Truendo before its category) of the proper category to the trigger section.

Make sure that the TRUENDO trigger is the only trigger in the tag!

FAQ

Can I set scripts in GTM and outside of GTM at the same time.accent

Answer: Yes, you can. However make sure that Google Tag Manager is the first script that is being loaded on the website. The scripts outside of GTM still have to be set according to the documentation.