Integrate Google Tag Manager

How to setup Google Tag Manager

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

Step 1

Create a ‘Custom HTML’ Tag named TRUENDO Cookie Control and add the following code.

  1. Go to Tags.
  2. Click on New.
  3. Click on Tag Configuration and select Custom HTML.
  4. Name it TRUENDO
  5. Add the following code to the HTML field:

    function TruendoCookieControlCallback(cookieObj) {
        if (cookieObj.preferences) {
        if ( {
        if (cookieObj.statistics) {
        if (cookieObj.social_content){
        if (cookieObj.social_sharing) {
    <!-- TRUENDO Privacy Center -->
    <script async="" id="truendoPrivacyPanel" type="text/javascript" src="" data-siteid="YOU WEBSITE ID"></script>
    <!-- End TREUNDO Privacy Center -->

    Note: You need to add the TRUENDO integration script in here instead of the <head> if you want to call TRUENDO via Tag Manager.

  6. Tick Support document.write on.

  7. Click on Triggering and add All Pages and press Save.

Step 2

We now have to create variable that connects to the TRUENDO cookie truendo_cc.

  1. Go to Variables.
  2. Click on New.
  3. Name the Variable TruendoCookie
  4. Click on Variable Configuration and select 1st-Party Cookie.
  5. Write truendo_cc in the Cookie Name.
  6. Tick URI-decode cookie and press Save.
Step 3

Now we have to make sure that each Trigger has an addtional condition to only fire when the category is set to on.

  1. Go to Triggers.
  2. Click on a trigger 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.


    TruendoCookie > contains > "statistics":true

  4. Do points 1-3 for every trigger in the list.

Step 4

Now you have to set up the triggers for the tags. This means creating one trigger for every category (preferences, marketing, statistics, social_content and social_sharing). One Custom Event Trigger for each category.

You can do like so:

  1. Go to Triggers.
  2. Click on New.
  3. Click on Trigger Configuration and select Custom Event
  4. Name your trigger according to the category and configure the event as follows:
The Custom Event looks as follows:

Name: truendo_[category]
Event Name: truendo_cc_[category]
This trigger fires on: All Custom Events


Name: truendo_statistics
Event Name: truendo_cc_statistics
This trigger fires on: All Custom Events

Note: These triggers do not need the conditions of Step 3.

Step 5

The last step is applying these triggers to the other tags (E.g. Google Analytics, Hotjar, Outbrain, etc.) you want to control. To do this add the Custom Event trigger of the proper category to the trigger section.

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