Secure Privacy

Implementing Google Consent Mode with Secure Privacy

Step-by-step guide to configuring Google Consent Mode v2 (Advanced) through Secure Privacy GTM community template.

AS
Andrew Sidorkin
3 min read ()

Overview

Google Consent Mode (GCM) is an API that adjusts how Google tags behave based on a user's consent choices. When integrated with Secure Privacy, it ensures your Google Analytics, Google Ads, and other Google tags automatically respect consent preferences -- without you having to manually block and unblock each tag.

This guide covers the Advanced implementation using the Secure Privacy community template in Google Tag Manager.

Basic vs. Advanced Mode

Feature Basic Mode Advanced Mode
Tag behavior before consent Tags do not fire Tags fire with limited, cookieless data
Analytics data Only from consenting users Aggregate modeling for all users
Implementation complexity Lower Moderate
Data completeness Partial More complete (with modeling)

Advanced Mode is recommended for most websites because it provides better data coverage while still respecting user privacy. When a user declines analytics cookies, Google only collects aggregate, cookieless pings -- no personal data.

Who Is This For?

  • Website administrators managing Google tags
  • Developers and technical marketers implementing consent flows
  • Compliance professionals ensuring GDPR and ePrivacy alignment

Step 1: Prepare Google Tag Manager

If you are an existing Secure Privacy user who previously added the script directly to your site's tag, remove it before proceeding. The GTM template will handle everything.

New users do not need to add any script to the site header -- the GTM template manages it entirely.

Step 2: Add the Secure Privacy Template

  1. In Google Tag Manager, go to Tags > click New
  2. Click Tag Configuration
  3. Select Discover more tag types in the Community Template Gallery
  4. Search for Secure Privacy
  5. Select the Secure Privacy CMP template
  6. Click Add to Workspace, then confirm by clicking Add

Step 3: Configure the Tag

  1. Enter your Secure Privacy Domain ID (found in your Secure Privacy dashboard under the Installation tab)
  2. Configure any additional settings as needed

Default consent states determine what happens before a user interacts with the consent banner.

  1. Click Add Setting in the tag configuration
  2. For each consent category, choose Granted or Denied from the dropdown
  3. Set the Region using ISO 3166-2 codes (e.g., DE for Germany, FR for France). Use all if you do not want to geo-target
  4. Click Add to save the setting

For EEA visitors, best practice is to set all non-essential categories to Denied by default. For other regions, consult your legal team about appropriate defaults.

Step 5: Set the Trigger

Select Consent Initialization - All Pages as the trigger for the tag.

Step 6: Save and Publish

  1. Click Save
  2. Use Preview mode to test the integration
  3. Verify consent signals are being sent correctly using the GTM debug panel
  4. Once confirmed, click Submit and Publish

Google Consent Mode v2 supports five consent types plus two additional parameters:

Consent Type Controls
ad_storage Advertising cookies
analytics_storage Analytics cookies
functionality_storage Functional cookies
personalization_storage Personalization cookies
security_storage Security-related cookies
ad_user_data (new) Sending user data for advertising
ad_personalization (new) Personalized advertising

Secure Privacy automatically maps its consent categories to these Google consent types.

Troubleshooting

Tag not firing as expected

Double-check that the trigger is set to Consent Initialization - All Pages and that no other consent tools are installed on the page.

Verify your Secure Privacy Domain ID is correct. Then clear all caches and test again in an incognito window.

Advanced Mode data not appearing in Google Analytics

Consent Mode modeling requires a minimum traffic threshold. Google needs approximately 1,000 daily events with consent granted for at least 7 days before modeling activates.

  • How to Install Secure Privacy with Google Tag Manager
  • Blocking Cookies with Google Tag Manager
  • Google's EU User Consent Policy requirements

Need more help?

Our privacy experts are here to guide you through complex regulations and find the right solution.

Contact Support

Related Articles

View all