Features Pricing GDPR cookie banner Google Consent Mode v2 WordPress plugin Cookiebot alternative For Agencies GDPR ePrivacy About Contact
RO | EN
Start Free →

How does CookieFix integrate with Google Tag Manager?

CookieFix automatically sets Google Consent Mode v2 signals before any Google tags fire. When a visitor gives or denies consent, CookieFix updates all consent signals in real time, allowing GTM to respect user privacy choices.

  • Google Consent Mode v2 signals set before GTM loads
  • Real-time consent signal updates on user interaction
  • Compatible with GA4, Google Ads, and all GCM-aware tags
  • No additional GTM configuration required

Automatic Consent Mode Integration

CookieFix sets Google Consent Mode v2 default signals immediately on page load, before GTM or any Google tag fires. When the user interacts with the consent banner, CookieFix updates the signals in real time.

  • Page loads: CookieFix sets default consent signals (denied) before GTM initializes.
  • GTM fires: Google tags check consent signals and respect the denied state.
  • User consents: CookieFix updates consent signals to granted. Tags fire with full data.
📊

Google Consent Mode v2 Signals

CookieFix manages all four required Consent Mode v2 signals:

  • ad_storage — Controls advertising cookies (Google Ads, remarketing)
  • analytics_storage — Controls analytics cookies (GA4)
  • ad_user_data — Controls sending user data for advertising
  • ad_personalization — Controls personalized advertising
🔒

Step-by-Step Integration

  • 1 Install CookieFix on your website using the embed script from your dashboard.
  • 2 Make sure the CookieFix script is placed before the GTM container snippet in your HTML.
  • 3 That's it! CookieFix automatically handles all Consent Mode signals. No GTM template needed.

Recommended Script Order

Place the CookieFix script first, then the GTM container:

<!-- 1. CookieFix (FIRST) -->
<script data-cbid="YOUR_DOMAIN_KEY" data-blockingmode="auto">
  // CookieFix inline embed script
</script>

<!-- 2. Google Tag Manager (AFTER CookieFix) -->
<script>(function(w,d,s,l,i){...})(window,document,'script','dataLayer','GTM-XXXXX');</script>
⚙️

Verify Your Integration

To confirm Consent Mode is working correctly:

  • Open Chrome DevTools and go to the Console tab.
  • Before giving consent, check that gtag consent defaults are set to "denied".
  • Accept cookies and verify the signals update to "granted".
  • In GTM Preview mode, check that tags fire only after consent is granted.

Ready to set up compliant tracking?

Create your free CookieFix account and get Google Consent Mode v2 working in minutes.

Create free account