Your One-Stop Source for the Latest PPC News
Your One-Stop Source for the Latest PPC News

How to Implement Cookiebot with Google Tag Manager in 5 Steps

A graphic of a tag with the Google Tag Manager logo in the center, surrounded by Cookiebot cookie icons and gear symbols on a blue background, illustrating how to implement effective tag management.

Disclaimer: This post may contain affiliate links. If you make a purchase through them, we may earn a commission at no extra cost to you.

A graphic of a tag with the Google Tag Manager logo in the center, surrounded by Cookiebot cookie icons and gear symbols on a blue background, illustrating how to implement effective tag management.

Looking for a simple way to manage cookie consent on your website? Cookiebot takes care of compliance automatically, and when combined with Google Tag Manager (GTM), the setup becomes quick and code-free.

Get Started with Cookiebot Today With 15% Off for 6 Months [SPECIAL OFFER]

Use Cookiebot CMP to collect user consent, stay compliant with GDPR and other global regulations, and ensure proper implementation of Consent Mode. Trusted by millions, available in 47+ languages, it’s the most popular solution for balancing privacy and performance. Easy to set up, fully customizable, and Google-certified.

In this article, I’ll walk you through how to implement Cookiebot using GTM in just 5 steps. From initial setup to final configuration, you’ll have a fully functional cookie-consent solution up and running in no time.

Before diving into the installation process, let’s get acquainted with our main characters:

Cookiebot: A robust, Google-certified Consent Management Platform (CMP) that helps websites comply with data protection laws by displaying a consent banner, managing user choices, and controlling cookie behavior.

Cookie consent pop-up from Usercentrics Cookiebot with three options: Deny, Customize, and Allow all. The message explains the use of cookies for personalisation, social media, analytics, and includes details on consent mode.

Google Tag Manager (GTM): A free tool from Google that allows you to manage and deploy marketing tags (snippets of code) on your website without the need to modify the site’s code directly.

A flowchart titled "How GTM Works" shows data moving from a website to a data layer, then to Google Tag Manager, which can implement tools like Cookiebot and send data to platforms such as Google Ads, Microsoft, Analytics, Facebook, and more.

Consent Mode: A privacy-friendly feature that adjusts how tags in Google Tag Manager behave based on user consent. Instead of blocking all tags by default, Consent Mode lets you control how data is collected, only sending limited or no data until the user gives permission.

A four-step guide to consent mode: 1) User sets consent on website, 2) Consent mode informs Tag Manager, 3) Tags adjust if consent isn’t given, 4) Google models data for reporting and optimization.
Source: Google

📔 Want to learn more? Take a deeper dive into Consent Mode and see how it works behind the scenes.

By integrating Cookiebot with GTM and enabling Consent Mode, it ensures your analytics and marketing tools respect privacy choices while still providing useful insights.

⚠️ Note: You can install Cookiebot on your website without using Google Tag Manager, but it requires some coding knowledge. If you’re not comfortable with that, using GTM is a much quicker and easier option.

Prepared to begin? Follow these 5 steps to integrate Cookiebot with GTM:

Get Started with Cookiebot Today With 15% Off for 6 Months [SPECIAL OFFER]

Use Cookiebot CMP to collect user consent, stay compliant with GDPR and other global regulations, and ensure proper implementation of Consent Mode. Trusted by millions, available in 47+ languages, it’s the most popular solution for balancing privacy and performance. Easy to set up, fully customizable, and Google-certified.

Step 1: Create a Cookiebot Account and Add Your Domain

  1. Sign Up: Visit the Cookiebot website and sign up for an account. A 14-day free trial is available to get you started.
Screenshot of the Cookiebot website, featuring a blue banner promoting cookie banner solutions and easy implementation via Google Tag Manager, a graphic of a cookie notice, and usage stats: 2.3 million sites, 7 billion consents, 47+ languages.
  1. Add Domain: After logging in, navigate to the Domains section and add your website’s domain. Cookiebot will scan your site and generate a cookie declaration, detailing all cookies and trackers found.
Screenshot of a web dashboard with a highlighted “Domains & Aliases” section. The main panel explains Domain Group #1 for consent tracking, suggesting users add domains—ideal for Cookiebot implementation—with a blue “Add domain” button below.
  1. Customize Your Cookie Consent Banner: In Cookiebot, go to the Configuration section to design your cookie consent banner. You can customize its appearance and behavior to align with your website’s design and local legal requirements.
A user interface for customizing a consent banner helps you implement options for layout, design, and compliance. A preview window displays a consent dialog with “Deny,” “Customize,” and “Allow all” buttons—perfect for use with Cookiebot.

🎨 Uncertain if your cookie banner meets all requirements? Here are 13 must-have consent banner requirements with real examples.

Step 2: Adding Cookiebot in Google Tag Manager

  1. Enter GTM: Sign into your Google Tag Manager account.
  2. Add Cookiebot Template by navigating to the Templates section in the left menu.
  3. Click on Search Gallery in the Tag Templates section
Screenshot of a "Templates" page in a web application, similar to Google Tag Manager, showing empty sections for Tag Templates and Variable Templates. Users can implement new templates or "Search Gallery"; a red arrow highlights the search option.
  1. Type Cookiebot in the search box
  2. Select the Cookiebot CMP template and click Add to workspace. Confirm by clicking Add.
A screenshot showing the "Import Tag Template" screen in Google Tag Manager with "cookiebot" typed in the search bar and a red arrow pointing to the "Cookiebot CMP" option by Usercentrics, ready to implement.
  1. Create a New Tag by going to the Tags section and click New to create a new tag.
  2. Click on Tag Configuration and select Cookiebot CMP from the list of available tags.
  3. Give the new tag a name, such as Cookiebot.
  4. In the “Cookiebot ID” field, paste your Domain Group ID from the Cookiebot admin panel. You’ll find it under the Implementation section, scroll down to Installation guides to locate your Domain Group ID.
  5. Make sure that Google Consent Mode is enabled.
Screenshot of a Google Tag Manager setup page showing how to implement Cookiebot CMP settings, with arrows highlighting the Cookiebot ID field and the checked "Enable Google Consent Mode" option.
  1. In the Trigerring section, choose Consent Initialization – All Pages as trigger. This trigger makes sure that your consent banner will be launched before any other tags.
  2. Your tag is now set up. Go ahead and save it.
Screenshot of the Cookiebot CMP tag implementation in Google Tag Manager, displaying tag permissions, selected language, Google Consent Mode enabled, and a trigger for Consent Initialization on all pages.
  1. Enable Consent Overview:
    • In GTM, go to Admin > Container Settings.
    • Check the box Enable consent overview under Additional Settings and click Save.
Screenshot of the "Edit container" page showing settings like container name, target platform "Web," default workspace name, and an enabled "Enable consent overview (Beta)" checkbox—ideal for those looking to implement Google Tag Manager.
  1. Review Consent Settings:
    • Return to the Tags section. You’ll notice that a shield icon now appears on the top right.
    • Click on the shield icon to manage consent settings.
A partial screenshot of a web interface shows “Workspace Changes: 0,” with “Preview” and “Submit” buttons. An arrow highlights a shield icon—ideal when you implement Google Tag Manager next to the magnifying glass and “New” button on the right.
  1. Adjust Consent Settings for Each Tag:
    • Tags with built-in consent (usually tags created by Google): Mark them all and choose No additional consent required.
    • Tags with built-in consent (like Facebook Pixel): Open each tag, enable Require additional consent for tag to fire, and choose the appropriate consent types.
Screenshot of a Consent Overview page with a list of configured consents. A data table shows consent names, providers, and types, with a red box highlighting built-in and additional consent tags for streamlined Cookiebot implementation.

🔧 Do you need to implement Microsoft’s Consent Mode too? This guide to Microsoft Advertising Consent Mode covers everything you need to know.

Step 4: Test Your Implementation

  1. Preview Mode: In Google Tag Manager, click on Preview to enter Debug mode. This allows you to test your tags without publishing changes.
  2. Consent Testing: Visit your website in Debug mode. Interact with the cookie consent banner to ensure that tags fire or are blocked based on user consent.
  3. Publish Changes: Once satisfied with the setup, return to GTM and click “Submit” to publish your changes.
Screenshot of a Google Tag Manager (GTM) consent state table, showing various types of data storage with their consent statuses. Consent Mode is implemented, with some marked "Granted" in green, while others are "Denied" in red. A red arrow points to the "Current State" column to check if consent is enabled.

🕵️ Not sure if everything’s firing correctly? Here are 9 methods to check if Consent Mode is enabled. Choose the one that suits you best.

After adding your domain in Step 1, Cookiebot will automatically scan your website and generate a Cookie Declaration for you.

This scan runs monthly to keep your statement up to date, and there’s also an option to pay for more frequent scans if needed.

To display the Cookie Declaration content on your website follow these steps:

  1. Open or create a page on your website where you want the Cookie Declaration to appear.
  2. In the Cookiebot admin panel, go to Implementation > Cookie declaration tab.
  3. Click Copy to clipboard to copy the script tag.
A website dashboard displays the "Implementation" section, highlighting the "Cookie declaration" tab. Cookiebot integration instructions for Google Tag Manager are shown, alongside an example script tag in a grey box on the right.
  1. Paste the script tag into your page content using Custom HTML block. Then save the page.
Screenshot showing a section titled "Cookie Declaration" with a JavaScript code snippet, and a red arrow pointing to the "Custom HTML" button being selected to implement Cookiebot in Google Tag Manager.

Conclusion

By following the steps outlined in this guide, you can confidently manage user consents and control the loading of scripts based on those consents using Cookiebot.

Get Started with Cookiebot Today With 15% Off for 6 Months [SPECIAL OFFER]

Use Cookiebot CMP to collect user consent, stay compliant with GDPR and other global regulations, and ensure proper implementation of Consent Mode. Trusted by millions, available in 47+ languages, it’s the most popular solution for balancing privacy and performance. Easy to set up, fully customizable, and Google-certified.

Remember, staying compliant not only builds trust with your users but also enhances the overall credibility of your website. Plus, by properly managing consent, you can take full advantage of advertising functionalities while respecting user privacy.

Share this article
0
Share
Shareable URL
Read next