How to add Google Consent Mode V2 to Shopify with TinyCookie?

How to add Google Consent Mode V2 to Shopify with TinyCookie?
By purchasing through the links on this page, you are giving us the opportunity to earn a commission. Your support is greatly appreciated!

Consent Mode V2 has become a mandatory element for all Shopify merchants who use Google services like Google Analytics or Google Ads. It’s an upgraded version of the original Google Consent Mode and helps websites communicate users’ cookie consent to Google tags.

The Consent Mode V2 setup process on Shopify involves getting a cookie consent banner like TinyCookie, adding Google Tags to your Shopify store, and editing your theme code. Although it may sound challenging at first, we’re here to help.

In this article, we’ll teach you step-by-step how to add Google Consent Mode V2 to Shopify with TinyCookie. You’ll also learn all about the Consent Mode V2 tool, including its basic and advanced modes, and more.

Get a cookie consent banner app with complete advanced Google Consent Mode V2 support

Try TinyCookie now

Google Consent Mode V2 is a modified version of Consent Mode which is made to align with user preferences and data privacy laws. In simple terms, it helps websites transmit user cookie consent preferences to Google tags that are responsible for measuring your digital channel performance and advertising.

Google Consent Mode V2 also introduced the concepts of basic and advanced consent modes. The difference is that the basic mode doesn’t collect data until consent is granted.

Meanwhile, advanced mode means that Google’s tags use cookieless data pings to model the behavior of website visitors who don’t grant cookie consent.

Note that Google Consent Mode is not a standalone consent solution but rather an additional feature to ensure Google tags work in compliance with user consent preferences. Together with this tool, you need a Consent Management Platform (CMP) or a cookie consent banner like TinyCookie.

Google Consent Mode vs Google Consent Mode V2

Google Consent Mode V2 is an upgrade from Google Consent Mode. It was created to comply with the European Digital Markets Act (DMA), report user consent status back to Google, and protect user privacy by ensuring transparency.

Here are the main differences between Consent Mode and Consent Mode V2:

Google Consent Mode Google Consent Mode V2
Data usage parameters Analytics_storage (enables storage related to analytics) and ad_storage (enables storage related to advertising) Analytics_storage, ad_storage, ad_user_data (sets consent for sending advertising data to Google), and ad_personalization (sets consent for personalized ads)
Implementation Requires getting user consent Requires getting user consent and transmitting consent status to Google
Tracking If users don’t grant consent, Google won’t track them If users don’t grant consent, Google is allowed to use cookieless data pings (anonymous tracking)

Google Consent Mode V2 became mandatory for all websites that utilize Google services as of March 2024. So, here’s why it’s important:

  • More accurate data collection. If you wish to continue getting more precise EU user data on such services as Google Ads, Google Analytics, Conversion Linker, and Floodlight, you must implement Consent Mode V2.
  • Conversion modeling. Even if users don’t consent to marketing or analytics cookies, Consent Mode V2 adopts the modeling method which uses AI to predict their actions.
  • More accurate audience segmentation. Since Consent Mode V2 ensures more precise data collection, it also guarantees a more accurate audience segmentation.

To implement Google Consent Mode V2 on Shopify, you’ll need to install a supported cookie consent banner like TinyCookie and add the Google tag to your website. Here’s a complete step-by-step guide on how to get Consent Mode V2 on your Shopify website:

Step 1: Install a cookie consent banner

Implementing Google Consent Mode V2 requires getting a cookie consent banner that supports it, like TinyCookie. The app doesn’t just add a consent banner to your website – it also tracks consent, lets you manage cookies, and allows changing banner design or content.

Installing the app is very simple. All you have to do is:

  1. From the Shopify App store, install the TinyCookie cookie consent banner that supports Consent Mode V2. Follow the setup wizard instructions.
  2. Once the setup is complete, click “Enable embed” on the app’s Dashboard.Enable app embed of TinyCookie on Shopify
  3. You’ll be navigated to the Shopify theme editor. All you have to do is click Save.Embed TinyCookie app on Shopify editor

That’s it. Your cookie consent banner is now live.

Step 2: Add a Google tag to your Shopify website

Once you install the cookie consent banner that supports Consent Mode V2, you’ll have to add a Google tag to your Shopify website. There are 2 ways to do this – using Google Tag Manager or adding tags through Google Analytics 4 and Google Ads. Here are instructions for all of these platforms:

Method 1: Google Tag Manager

Sign up (if you don’t have one) or log into your Google Tag Manager (GTM) account. Follow this guide to create and install a new container for your Shopify website:

  1. Create a new container for your Shopify website by going to Accounts > More Actions > Create Container. Enter the container name, select type, click Create, and agree to the Terms of Service.
  2. Go to the Workspace tab, find your container ID, and click it. Copy the code snippets.
  3. Go to your Shopify Admin dashboard and head to Online Store > Themes. Click the three dots by the theme you want to edit and click Edit code.Edit theme code on Shopify
  4. Open the theme.liquid file and paste the copied <script> snippet straight under the <head> tag and the <noscript> snippet straight after the <body> tag.
  5. Click Save.

Method 2: Google Analytics 4 or Google Ads

If you don’t have a Google Tag Manager account, you can set up tags through Google Ads or Google Analytics. Here’s how to add both tags to your Shopify website:

  1. Install the Google & YouTube app from the Shopify App Store.
  2. To add the tag starting with “G-” (Google Analytics): go to your Shopify Admin dashboard > Online Store > Preferences. Click “Set up Google” under the Google Analytics section, choose the Google tag ID, and click “Connect your Google Analytics 4 property.”
  3. To add the tag starting with "AW-" (Google Ads): connect the Google & YouTube app to your Google account. Enable conversion tracking, agree with the Terms of Service, and click “Complete setup.”

You can also add tags without using an app – simply follow step-by-step instructions in Google’s “Shopify: Set up your Google tag” guide.

Step 3: Implement Google Consent Mode V2 with TinyCookie

Once everything is set up, the last step is implementing Google Consent Mode V2 using the TinyCookie app on Shopify. The process is very simple, all you have to do is complete these steps:

  1. In your Shopify Admin dashboard, open the TinyCookie app and head to Settings > Privacy integrations.
  2. Copy the provided code.Copy TinyCookie Consent Mode V2 code
  3. Now, go to Online Store > Themes. Click the three dots by the theme you want to edit and click Edit code.
  4. Go to the theme.liquid file and insert the copied code straight before the GTM snippet (gtag.js) if you want to update the consent status to “denied.” Click Save.
  5. Go back to the TinyCookie app > Settings > Privacy integrations and click Enable.

That’s it. You have now implemented Google Consent Mode V2 on your Shopify website.

Conclusion

Google Consent Mode V2 is a necessary addition to any Shopify website that needs to collect accurate analytics and advertising data about EU users. Plus, the tool helps comply with data privacy laws like GDPR by making sure data is only collected after consent is received.

To implement Consent Mode V2 on Shopify, you need to get a cookie consent banner app like TinyCookie. It not only supports the advanced Consent Mode V2 but it also lets you add a cookie consent banner, track user consent, manage your website cookies, and more.

Frequently asked questions

Yes, TinyCookie is compliant with Google Consent Mode V2 and can be enabled in the Privacy integrations section of the app’s Settings in Shopify.

Google Consent Mode V2 does not guarantee GDPR compliance by itself. It’s rather a part of a broader consent management strategy which includes getting a GDPR-compliant cookie policy, implementing a cookie consent banner like TinyCookie, and more.

Google Consent Mode V2 is mandatory for all websites that use Google services. It ensures that you can track EU user data more precisely even if they don’t grant consent to cookies (using machine learning).

If your website is using Google services, like Google Analytics or Google Ads, your website needs to use Google Consent Mode. It helps such services provide you with more accurate data about your website visitors from the EU.

About the author
Nikoleta Kokleviciute
Nikoleta is a Marketing Manager at TinyCookie, an app for GDPR cookie consent for Shopify merchants. Nikoleta loves diving deep into digital marketing, eCommerce, social media trends, and creating content that benefits its readers!