Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
How to Integrate Google Consent Mode V2 on your Shopify store
Product Updates
15 mins
Dilyana Simeonova
February 13, 2024
A Shopify Merchant's Guide to Google Consent Mode V2 Integration
Hello Shopify merchants! With the digital landscape evolving rapidly, protecting your store's compliance with data privacy laws has never been more critical.
That's why we're here to walk you through the latest update from Consentmo - the integration of Google Consent Mode V2 (GCM V2).
This guide is designed to simplify the integration process, making compliance a breeze for your store.
What is Google Consent Mode V2?
Google Consent Mode V2 (GCM V2) is a privacy-focused tool developed by Google. It helps website owners, including Shopify merchants, manage user consent for cookies and data collection in a compliant way.
With GCM V2, your Shopify store adapts to the preferences of your visitors. It makes sure that their privacy choices are respected while still allowing you to collect valuable data for optimizing your online store.
Example:
Imagine a visitor lands on your Shopify store and sees a cookie consent banner. They choose to reject marketing cookies but accept analytics cookies.
With Google Consent Mode V2, the website adapts to this choice:
Marketing Data: Google Ads and similar tools won't track this user for remarketing campaigns because they rejected marketing cookies.
Analytics Data: Google Analytics still collects anonymized data like page views, bounce rates, and time spent on the site (excludes any user-specific details).
This approach helps your store comply with global data protection regulations (like GDPR & CCPA) without sacrificing analytics insights.
Dynamic Adjustment of Services (based on consent from the cookie bar)
Google Consent Mode V2 works smoothly with Google Ads, Google Analytics and Google Tag Manager. Let's take a closer look how these important marketing tools work depending on user consent:
Google Ads. If a user accepts marketing cookies, GCM V2 enables full functionality for remarketing and conversion tracking. This helps you optimize campaigns by tracking user actions, such as purchases or sign-ups. If marketing consent is denied, the system adjusts by anonymizing conversions (you can still measure the numbers but without seeing user details)
Google Analytics. For store visitors who accept analytics cookies - you can access detailed reports, including user behavior, demographics, and real-time activity. If consent is denied, the system will provide non-identifiable data like total visits or bounce rate.
Google Tag Manager. Same here. GCM V2 dynamically adjusts which tags are fired based on consent preferences. For example, marketing tags won’t trigger if a user rejects marketing cookies, while essential or analytics tags (if consented) will still execute. If you know Tag Manager you know this lingo.
This smooth integration guarantees that you can manage marketing campaigns effectively + analyze performance metrics while respecting user consent choices.
Benefits for Shopify Store Owners
For Shopify merchants, adopting Google Consent Mode V2 (GCM V2) provides several significant advantages:
Real-Time Adaptability: The system instantly adjusts to what your visitors agree to, making sure you're collecting data responsibly and staying on the right side of the law.
Build credibility and compliance: GCM V2 puts user privacy first by honoring their preferences. This not only helps you meet regulatory requirements but also strengthens your reputation and keeps customers coming back.
Optimized Marketing and Analytics: GCM V2 allows tools like Google Analytics and Google Ads to function within the boundaries of user consent. This means you can still analyze site traffic effectively and run targeted ads.
Driving Sales and Improving Customer Experience: By maintaining the functionality of analytics and ads, GCM V2 supports key activities that drive sales and enhance the shopping experience.
Meeting Global Privacy Regulations
Google Consent Mode V2 is designed to comply with strict global privacy regulations:
Alignment with Privacy Laws: GCM V2 adapts to regulations such as the GDPR and CCPA, helping you protect your online business against legal challenges regarding data privacy.
Proactive Compliance and Strengthen Confidence: The system manages data interactions proactively, staying ahead of compliance requirements and minimizing legal risks.
Boosting Customer Confidence: Demonstrating a commitment to privacy strengthens customer relationships, encouraging loyalty and fostering a positive brand image.
⚠️ Shopify’s Privacy & Consent app is removed from the App Store. It is replaced by the new Customer privacy tab in the Settings of the Shopify admin.
⚠️ As of 2025, Google Consent Mode V 2 does not come readily as a Shopify option. You need to install an additional compliance app, like Consentmo, which will provide you with a needed script.
Okay, now - if you're setting up GCM V2 for the first time, follow these steps for a smooth integration:
1. Access Your Shopify Admin: Login to your Shopify Admin dashboard.
2. Navigate to Your Online Store: Click on the 'Online Store' link located in the left sidebar to access your theme settings.
3. Edit Your Theme Code: From the 'Actions' dropdown, select 'Edit Code'. This will take you to a page where you can edit your store's theme files.
4. Update the theme.liquid File: Locate the theme.liquid file in the list on the left. Open it and look for the opening <head> tag. Directly after this tag, insert the line {% render 'gcm-integration-script' %}. This guarantees that the Google Consent Mode script executes right at the start before any other tracking services like Google Tag Manager or Google Ads kick in.
5. Create a New Snippet: In the 'Snippets' section of your theme files, create a new liquid file named 'gcm-integration-script.liquid'.
6. Insert the Integration Script: Copy the content of the integration script provided by Consentmo here and paste it into the gcm-integration-script.liquid file you just created. The final result should look like this:
Are you a Shopify store already using Consentmo?
Make sure you are taking advantage of our GCM V 2 integration which we have made as simple as possible.
You can check out our super detailed page on how to do so in our Support section.
Google Consent Mode Variants
Google Consent Mode V2 (GCM V2) offers a strong framework for handling user consent. It has two main settings: Before and After consent. This dual-mode feature is designed to ensure that data collection is user-friendly and complies with privacy rules.
Before Consent is Given: By default, before the user gives consent, GCM V2 blocks all data categories. This means that no cookies or tracking tech gathers Personally identifiable information (PII) or any other data. This default blocking stance makes sure that your Shopify store respects user privacy from the moment they land on your site. It aligns with privacy-first principles and complies with laws like the GDPR.
After Consent is Given: Once consent is provided by the user, GCM V2 updates its settings dynamically to align with the user's preferences. Google Analytics kicks in when visitors accept the performance cookies and tracks how users behave on your site. This response adapts to maintain that essential Google services, like Google Ads and Google Analytics, function effectively. They enhance your ability to run effective marketing campaigns and site performance analyses, based on the user's level of consent.
Streamlined Data Collection Based on User Preferences: GCM V2 is innovative - it changes the services in real time based on consent status. This means your data collection and processing always match your customers' privacy preferences at all times, even if changed later on by them.
Conclusion
Implementing Google Consent Mode V2 is a significant step towards respecting user privacy while maintaining your store's analytics capabilities.
For more detailed information on how to get started with Consentmo, visit our Shopify App listing page. Dive deeper into Consentmo's features and explore how we can help streamline your store's compliance and privacy practices, beyond GCM V2.
Looking for more insights? Check out our other blog posts on compliance, Shopify, privacy laws and everything else you need.
Let's navigate the compliance landscape together!
About the Author
Dilyana Simeonova
Dilyana is a Marketing Specialist in Consentmo with an academic background in Advertisement and Brand Management. Stumbling into the tech world with this job, she feels like she finally found her calling and is set on bringing the best compliance information to all Consentmo users.
TikTok’s US ban begins Jan 19. Explore why it’s happening, the lack of federal privacy laws, and the rise of Xiaohongshu as the next big app. Is it safe for users?