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
- In Google Tag Manager, go to Tags > click New
- Click Tag Configuration
- Select Discover more tag types in the Community Template Gallery
- Search for Secure Privacy
- Select the Secure Privacy CMP template
- Click Add to Workspace, then confirm by clicking Add
Step 3: Configure the Tag
- Enter your Secure Privacy Domain ID (found in your Secure Privacy dashboard under the Installation tab)
- Configure any additional settings as needed
Step 4: Set Default Consent States
Default consent states determine what happens before a user interacts with the consent banner.
- Click Add Setting in the tag configuration
- For each consent category, choose Granted or Denied from the dropdown
- Set the Region using ISO 3166-2 codes (e.g.,
DEfor Germany,FRfor France). Useallif you do not want to geo-target - 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
- Click Save
- Use Preview mode to test the integration
- Verify consent signals are being sent correctly using the GTM debug panel
- Once confirmed, click Submit and Publish
Consent Types in GCM v2
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.
Consent changes not reflected in Google tags
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.
Related Articles
- How to Install Secure Privacy with Google Tag Manager
- Blocking Cookies with Google Tag Manager
- Google's EU User Consent Policy requirements