Consent Mode v2: Implementation Pitfalls and Fixes

Since Google’s Consent Mode v2 arrived, marketers and developers have been scrambling to get it right. It promises smarter tracking that also respects user privacy. Sounds like a win-win, right? Well… not so fast. If you’re diving into Consent Mode v2 without a plan, you might be in for a bumpy ride.

In this article, we’ll break down what Consent Mode v2 is, share some common mistakes, and—most importantly—show you how to fix them. We’ll keep it light, fun, and super practical.

🚥 What is Consent Mode v2?

Consent Mode v2 is Google’s way of helping you balance data collection and privacy compliance. It lets your website continue to function and gather limited data even before users give full consent for cookies or ads. The main updates in version 2? It now supports:

  • ad_storage: for ad personalization and remarketing
  • analytics_storage: for Google Analytics tracking
  • ad_user_data: new! handles user data for ads
  • ad_personalization: also new! controls personalized ads

If users say “no thanks” to cookies, Consent Mode v2 switches gears and uses modeled data instead of exact tracking. Sounds smart, right?

But there’s a catch…

😵 Common Pitfalls When Implementing Consent Mode v2

Even though the idea is fantastic, there are quite a few ways your implementation could go sideways. Let’s look at the most common issues.

1. Misplacing the Script

Your Consent Mode code needs to run as early as possible. Like… immediately in the <head> of your site. If not, it won’t prevent cookies from firing too early.

Fix: Place the Google Consent Mode snippet at the top of your page, before any analytics or ad scripts.

2. Not Waiting for a Real Consent

Some websites send consent signals to Google even when the user hasn’t interacted with the cookie banner. That’s a no-no.

Fix: Use your Consent Management Platform (CMP) to only send the signal after the user has made a choice.

iubenda generate a cookie banner

3. Forgetting About Default States

If you don’t set a default mode, Google might assume consent. Oops. That means data starts flowing without permission. Also bad for GDPR.

Fix: Always start with 'denied' for all storage types, and update them only when the user agrees.

gtag('consent', 'default', {
  'ad_storage': 'denied',
  'analytics_storage': 'denied',
  'ad_user_data': 'denied',
  'ad_personalization': 'denied'
});

4. Skipping the New Parameters

Consent Mode v2 adds two new parameters: ad_user_data and ad_personalization. Don’t ignore them!

Fix: Update your CMP to handle these new elements alongside ad_storage and analytics_storage.

5. Overcomplicating the Setup

Some setups try to update consent with too many gtag calls. It gets messy fast.

Fix: Use one initial 'default' call, and one 'update' call when the user makes a choice. Keep it clean and readable.

🛠️ Fixes and Best Practices

If you’re nodding right now thinking, “Yep, I did that…” — don’t worry. Let’s turn this ship around.

✨ Best Practice #1: Use a Certified CMP

Consent Mode v2 practically needs a solid CMP to function correctly. Use a platform that’s Google-certified, like:

  • OneTrust
  • Cookiebot
  • Quantcast
  • Usercentrics

Your CMP does the heavy lifting—managing notice, preferences, updates, and more.

✨ Best Practice #2: Validate Your Setup

Don’t rely on guessing! Test your site using:

  • Google Tag Assistant
  • Browser dev tools (check the cookies and network requests)
  • Chrome extension: Consent Mode Helper

If your cookies are firing before consent? Bug alert. 🚨

✨ Best Practice #3: Handle Rejections Gracefully

Some users will say no. Please don’t pop up a thousand banners begging them to say yes. That’s not cool—and not legal either.

Instead, ensure your website still works. Even without cookies, users deserve a great experience.

✨ Best Practice #4: Use ‘Conversion Modeling’

If you’re using Google Ads, you’re gonna love this. With Consent Mode v2, you can get modeled conversions using aggregate, anonymous data. That means better reporting even with missing cookies.

But it only works if Consent Mode is set up perfectly. So again—test everything!

📋 Sample Setup (The Right Way)

Here’s what a simple, clean implementation could look like:

<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}

  // Set default consent to denied
  gtag('consent', 'default', {
    'ad_storage': 'denied',
    'analytics_storage': 'denied',
    'ad_user_data': 'denied',
    'ad_personalization': 'denied'
  });

  // Load tracking scripts
  gtag('js', new Date());
  gtag('config', 'G-XXXXXXX');
</script>

After the user makes a choice via your CMP, update consent with this:

gtag('consent', 'update', {
  'ad_storage': 'granted',
  'analytics_storage': 'granted',
  'ad_user_data': 'granted',
  'ad_personalization': 'granted'
});

Customize those values depending on what the user agreed to. Easy-peasy.

🤓 A Quick Glossary (Because Acronyms)

  • CMP: Consent Management Platform
  • GTAG: Google’s global site tag (used for GA and Ads)
  • GDPR: General Data Protection Regulation (Europe’s privacy law)
  • EEA: European Economic Area (where GDPR applies)

🎯 Final Thoughts

Consent Mode v2 is powerful—but only when implemented correctly. If you rush it, you could lose tracking data and get into legal hot water. Yikes.

So take your time. Use the right tools. Test thoroughly. And remember:

  • Private doesn’t mean powerless
  • Compliance can still be profitable
  • Respect = ROI

Consent Mode v2 isn’t going away. You’ll need it for Google Ads and Analytics in the EU starting March 2024. So why not nail it now and stay ahead of the game?

Google Analytics search on phone

Got stuck? Grab a dev friend. Bake them cookies. Make sure they’re privacy-compliant ones.