What is Google Consent Mode and Why Do You Need It?
In short, Google Consent Mode is a tool that helps online stores like yours follow privacy laws in Europe and the UK. When visitors come to your site, it lets Google know if they accept or reject cookies for ads or analytics. This is important because many users choose not to share their data. Without Consent Mode, you might lose important data and ad performance insights. Consent Mode uses smart technology called conversion modeling to estimate some lost data. This can recover conversions lost when users reject cookies.Step 1: Enable Google Consent Mode in the Complianz App
- Log into your Shopify store and open the Complianz app for Shopify.
- Go to the Settings tab inside the app.
- Find the Google Consent Mode section.
- Turn on Google Consent Mode.
Step 2: Configure Google Tags for Advanced Mode
As mentioned above, Google Consent Mode works by adapting the behavior of Google tags based on user consent. To make sure this works properly, you have two ways to manage your Google tags:- Use the Google & YouTube app integration: If you use the Google & YouTube app, Complianz now supports it, making tag management mostly automatic. This is the easiest option and requires less manual setup.
- Add Google tags manually: If you prefer full control or want to customize tags, disable the automatic Google & YouTube app integration in Shopify, then add the tags yourself either directly in your theme or with a plugin like XO Insert Code.
Simply add Google tags manually to your website. You can do this either by:
- Inserting the Google tags directly into your website theme code.
- Using a plugin like XO Insert Code to add the tags.
Example A: Adding Google Analytics without Google Tag Manager
If you add Google Analytics without using GTM, you can use the standard Google Analytics script:
- Copy your Google Analytics script from your Google Analytics account.
- Paste the script directly into your Shopify theme or use XO Insert Code to place it on your site.
No additional configuration is required for Consent Mode here, as it works in the standard setup.
Example B: Adding Google Tags via Google Tag Manager (GTM)
If you’re using Google Tag Manager, add the GTM script manually, either in your theme or with the XO Insert Code plugin. Here’s how:
- Log into your Google Tag Manager account and get your GTM script.
- Add this GTM script manually to your Shopify theme or with the XO Insert Code plugin.
Step 3: Set Up Google Tag in Google Tag Manager
After adding the GTM script, no additional triggers or configuration are required to work with Google Consent Mode. Simply apply the “All Pages” trigger to ensure the tag fires across your entire site, as shown below:
With this setup, you’re working with the advance Consent Mode implementation. This means Google tags fire immediately, without blocking scripts beforehand, and they automatically adapt their behavior to the Google Consent Mode signal. Google tags are natively compatible with Consent Mode v2 signals.
No other special configuration is needed. Google Consent Mode will automatically adjust the tag behavior based on user consent.
Step 4: Verify That Google Consent Mode Is Working
To check if you set everything up correctly:
- Open your website in an incognito/private browser window.
- When the cookie banner shows, do not accept cookies yet.
- Open your browser’s Developer Console:
- Press F12 or right-click anywhere on the page and select Inspect, then go to the Console tab.
- Type
dataLayer
and press Enter.- You should see
"consent default"
set to"denied"
for all cookie purposes.
- You should see
- Now, accept the cookie banner.
- Type
dataLayer
again and press Enter.- You should see the consent status change to
"granted"
for all purposes.
- You should see the consent status change to
That’s it! This confirms that Google Consent Mode reacts properly to the user consent.
Setting up Google Consent Mode with Complianz helps your Shopify store respect privacy while keeping valuable data. It’s easy to set up and essential for staying compliant—especially with Google’s latest requirements. Get it set up today!