Mercive Logo
Caret right

Cookiebot Shopify: How to secure your store with Google Consent Mode V2

At Mercive, we help you ensure that your Shopify store complies with applicable data protection regulations such as GDPR and ePrivacy. An important part of this is the proper handling of cookies and user consent. In this guide, we will go through how to implement Cookiebot in your Shopify store and when it is necessary in relation to Google Consent Mode V2.

A Consent Management Platform (CMP) is a tool that helps businesses collect, store, and manage users' consent for the use of cookies and tracking technologies. This is crucial for complying with laws such as GDPR.

Cookiebot is a CMP that automatically scans your website for cookies, categorizes them, and displays a customized consent banner. It integrates with Google Consent Mode V2 to ensure proper signaling of consent to Google services.

Google Consent Mode V2 allows your website to adjust how Google services like Analytics and Ads function based on user consent. It enables:

  • Collection of aggregated data without cookies when consent is not given.
  • Better conversion measurement through modeling
  • Compliance with GDPR and ePrivacy

Consent Mode V2 is particularly important when you use Google Tag Manager to manage your tags and scripts.

When should you use Cookiebot in Shopify?

There are two paths you can take with consent management in Shopify:

1. You use Shopify's own sales channels.

If you only use Shopify's own integrations such as:

  • Facebook & Instagram Sales Channel
  • Google & YouTube
  • TikTok
  • Snapchat

… you can make do with Shopify's own consent solution underSettings > Customer Privacy Policy.

This solution works well for the native integrations and does not require an external CMP.

2. You use Google Tag Manager (GTM)

If you are using GTM to manage tracking (e.g., Google Analytics, Meta Pixel, TikTok Pixel, etc.), you need a CMP like Cookiebot to be fully compliant with Consent Mode V2.

How to implement Cookiebot in your Shopify store via Google Tag Manager

Cookiebot should always be installed and configured via Google Tag Manager when GTM is your primary method for tracking. Here are the correct steps:

1. Create a Cookiebot account

Go to cookiebot.com and create a free account. You will receive a unique CBID that you need to use in your scripts.

In the Cookiebot dashboard, you choose the layout, colors, and language for your cookie banner. Also select which consent categories you want (e.g., necessary, preferences, statistics, marketing).

  • Go to your GTM container.
  • Go toAdmin > Container Settings, and turn on "Consent Overview"
  • UnderConsent Initialization - tagare you creating a new tag (type: Cookiebot CMP)
  • Use Cookiebot's template from the GTM Template Gallery or Custom HTML with the script:

<script id="Cookiebot" src="https://consent.cookiebot.com/uc.js" data-cbid="YOUR_CBID" type="text/javascript" async></script>

  • ReplaceYOUR_CBIDwith your unique ID

All your other tags (e.g., GA4, Meta Pixel, TikTok) must now be configured to respect user consent:

  • Go into each tag.
  • Click onAdvanced Settings > Consent Settings
  • ChooseRequire additional consentand add for examplead_storage,analytics_storage,functionality_storage,personalization_storage

5. Test the setup

UseCookiebot CMP Debuggerand GTM Preview mode to ensure that the banner is displayed correctly and consent is respected before tags are activated.

Benefits of using Cookiebot (with GTM)

  • Automated compliance: Complete GDPR documentation and consent log
  • Integrating with Consent Mode V2: Requirements from Google after March 2024
  • User-customized UI: Choose your own design and language for your consent banner.
  • Central control of consentA place for all scripts and partners

Frequently asked questions

No. If you exclusively use Shopify's native integrations such as Facebook & Instagram, Google & YouTube, TikTok or Snapchat, you can rely on Shopify's own consent solution under Settings > Customer privacy policy. An external CMP like Cookiebot only becomes necessary if you manage tracking yourself through Google Tag Manager.

A Consent Management Platform (CMP) like Cookiebot collects, stores and manages the user's consent and displays the consent banner. Google Consent Mode V2 is Google's technology that adjusts how services such as Analytics and Ads behave based on that consent. In other words, the CMP sends the consent signal that Consent Mode responds to.

When GTM is your primary method for handling tags and scripts, Cookiebot should be installed and configured through GTM so that the consent signals are passed on correctly to your other tags, such as Google Analytics and Meta Pixel. This ensures that tracking is only activated once the user has given consent, and that you are fully compliant with Consent Mode V2.

Cookiebot helps you scan, categorize and obtain consent for cookies, which is a central part of GDPR and ePrivacy compliance. However, this assumes that the solution is configured correctly and that tracking is actually blocked until consent is given. GDPR also covers other areas, such as data processing agreements and a privacy policy, that fall outside the cookie banner itself.