How to setup Google Tag Manager
PLEASE NOTE: This only applies if you do not want to use our auto-blocking feature. Otherwise follow the instructions here
Here you’ll find a step-by-step guide for setting up Google Tag Manager in combination with TRUENDO.
Download our Tag Manager JSON file. This file contains the necessary tags, triggers and variables to make TRUENDO work with the Google Tag Manager.
Now you have to import the file to Workspace.
Go to the Admin Tab and click on Import Container
Then upload the TRUENDO-GTM.json file you downloaded before.
Set the Workspace to Default Workspace.
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.
- Click on Confirm.
Now we have to add your Site ID to the TREUNDO tag.
- Login to Console and go to Integration and to the Integrate into Website tab.
- Copy the Site-ID (This is the long number next to data-siteid).
- Back at the Google Tag Manager under the Tags tab, open your TRUENDO tag.
- 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.
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.
- Go to Triggers.
- 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.
- Then set the condition to: TruendoCookie > contains > "[category]":true and press Save.
TruendoCookie > contains > “statistics”:true
- Do points 1-3 for every trigger on the list.
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!
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.