Skip to content

Google Tag Manager


When implementing CookieHub using Google Tag Manager, the automatic cookie blocker is unable to block scripts loaded directly in the website's HTML code. Therefore, to ensure that tags are not loaded before obtaining consent, it is recommended to load all tags through Google Tag Manager.

CookieHub offers a convenient Google Tag Manager template that comes with integrated Google Consent Mode support, making it easy and hassle-free to implement into your existing Google Tag Manager container.


  1. Log in to your Google Tag Manager account.

  2. Go to the Tags section of your Google Tag Manager container.

  3. Click the New button above the list of tags. New tag

  4. Click the Tag Configuration section to select the tag type.

  5. Click "Discover more tag types in the Community Template Gallery" Discover more tag types in the Community Template Gallery

  6. Select the CookieHub CMP tag template by scrolling through the list of types or using the search function. Search the GTM Community Template Gallery

  7. Accept the permissions requested by the CookieHub CMP template by clicking Add. Search the GTM Community Template Gallery

  8. Type your 8 character CookieHub domain code. Click here for instructions on how to find the domain code. CookieHub domain code

  9. Click the Triggering area below to select the trigger.

  10. Select "Consent Initialization - All Pages" from the list. GTM firing trigger

  11. Click the Save button in the top right corner. Your tag configuration should look similar to this: GTM firing trigger

  12. Type a tag name or use the default "CookieHub CMP" and click Save GTM firing trigger

Congratulations! You have successfully configured the CookieHub tag in your Google Tag Manager container, which includes support for Google Consent Mode by default. This means that tags such as Google Analytics, Google Ads, and Floodlight that have built-in consent mode support will now work correctly without any additional changes.

Where can I find my Domain Code?

Your domain code is a unique identifier for your website on CookieHub. To find it, log in to your CookieHub account and navigate to the dashboard. The domain code can be found in the list of domains:

Domain code in list of domains

How can I verify setup?

If you have a paid subscription, you can run a cookie scan for your domain to verify that everything is set up correctly. The cookie scan will identify all cookies and detect if they are being set prior to consent or not. After the scan has completed, you'll receive a scan report by email, and you can also view a list of cookies detected and their status in the CookieHub dashboard.

Request a rescan

What's next?

If you have tags in your Google Tag Manager container that don't offer built-in consent, you'll need to manually select the correct category as additional consent and update the firing triggers for each tag. How to configure additional Consent?

Google Tag Manager (GTM) has a Consent Overview feature that enables you to see an overview of the consent mode setup in your container. This feature helps you identify which tags support built-in consent and which tags need to be configured using additional consent.

Having any problems? Refer to our Google Tag Manager Troubleshooting guide.