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 instead.

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. The template comes complete with triggers, variables, and the CookieHub tag pre-configured and ready to use.


Download your personalized template

To obtain a personalized template for your domain, follow the steps outlined below:

  1. Log in to your account on

  2. If you have already created a domain, click on it. Otherwise, click the "Add" button and create a new one.

  3. Click on the "Implementation" tab, and then select "Google Tag Manager". Implementation assistant

  4. Download the personalized Google Tag Manager template by clicking the "CookieHub template (cookiehub-gtm.json)" link. Download Google Tag Manager template

Import template to your Google Tag Manager container

To import the CookieHub template into your Google Tag Manager container, follow these steps:

  1. Log in to your Google Tag Manager account.
  2. Select the container to which you want to add the CookieHub template.
  3. Click on the Admin link from the top menu. Download Google Tag Manager template
  4. Go to the Container section and click on the Import Container button. Download Google Tag Manager template
  5. Choose the container file by clicking the "Choose container file" button. Download Google Tag Manager template
  6. Locate the cookiehub-gtm.json file that you have previously downloaded and click Open. Download Google Tag Manager template
  7. Under Choose workspace, select Existing. Download Google Tag Manager template
  8. Choose the Default Workspace or the workspace where you want to import the template from the list of workspaces. Download Google Tag Manager template
  9. Select Merge as the import option. It's important to note that Overwrite should not be selected, as this will remove all current tags configured in your Google Tag Manager container. Download Google Tag Manager template
  10. Click the Confirm button to start the import. Download Google Tag Manager template

Congratulations! You have successfully configured the CookieHub tag in your Google Tag Manager container, which includes automatic support for Google Consent Mode. 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.

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.


Regular updates and new features are added to the Google Tag Manager template, and upgrading the template may be necessary. To upgrade the template, follow the same instructions used during the initial installation process. The upgrade will update the CookieHub tag, variables, and triggers.

Please note that if you have made any changes to the configurations of the CookieHub tag, you may need to make those changes again after upgrading.