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.
To obtain a personalized template for your domain, follow the steps outlined below:
Log in to your account on dash.cookiehub.com.
If you have already created a domain, click on it. Otherwise, click the "Add" button and create a new one.
Click on the "Implementation" tab, and then select "Google Tag Manager".
Download the personalized Google Tag Manager template by clicking the "CookieHub template (cookiehub-gtm.json)" link.
To import the CookieHub template into your Google Tag Manager container, follow these steps:
- Log in to your Google Tag Manager account.
- Select the container to which you want to add the CookieHub template.
- Click on the Admin link from the top menu.
- Go to the Container section and click on the Import Container button.
- Choose the container file by clicking the "Choose container file" button.
- Locate the cookiehub-gtm.json file that you have previously downloaded and click Open.
- Under Choose workspace, select Existing.
- Choose the Default Workspace or the workspace where you want to import the template from the list of workspaces.
- 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.
- Click the Confirm button to start the import.
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.
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.
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.