How to Integrate Google Consent Mode (GCM) With Captain Compliance
This article explains how to integrate Google Consent Mode v2 (GCM v2) with Captain Compliance using Google Tag Manager (GTM).
It covers consent signal mapping, default consent configuration, and how Captain Compliance communicates consent state to GTM in both opt-in and opt-out models.
This article focuses on Google Consent Mode configuration and signaling. Tag-level firing logic and advanced GTM patterns are covered in separate articles.
Scope and Applicability
While this article focuses on integrating Google Consent Mode v2 using Google Tag Manager (GTM), the consent signals described here are not inherently GTM-specific.
Captain Compliance generates Google Consent Mode–compatible consent states that can be consumed by Google tags regardless of whether those tags are deployed via GTM or implemented directly using gtag. GTM is referenced throughout this article because it provides the most common, flexible, and maintainable integration model.
In other words:
Captain Compliance acts as the consent authority
Google Consent Mode v2 defines how consent is communicated to Google services
GTM is a recommended execution and orchestration layer, but not a strict requirement
Where configuration or examples are GTM-specific, this is called out explicitly.
Overview: Captain Compliance and Google Consent Mode v2
Google Consent Mode v2 requires websites to provide explicit, structured consent signals to Google tags for both analytics and advertising use cases.
Captain Compliance integrates with GCM v2 by:
Translating user consent choices into Google Consent Mode signals
Applying consent defaults based on your selected model (opt-in or opt-out)
Emitting consent events that GTM and downstream Google tags can observe and act upon
Google Consent Mode v2 Signal Mapping
Captain Compliance maps its internal consent categories to Google Consent Mode storage types as follows:
Google Consent Mode Category | Captain Compliance Category |
analytics_storage | Performance |
ad_storage | Targeting |
ad_user_data | Targeting |
ad_personalization | Targeting |
functionality_storage | Functionality |
security_storage | Strictly Necessary |
This mapping ensures that Google tags receive consent signals that accurately reflect the user’s selections in the Captain Compliance banner.
Configuring Default Google Consent Mode Values
Captain Compliance allows you to define default GCM values per domain. These defaults determine the initial consent state before a user makes a choice.
To access and configure defaults:
Navigate to Consent
Select your domain
Go to Configuration
Open Google Tag Manager
You will see toggles for the following categories:
Targeting Cookies
Functionality Cookies
Performance Cookies
Strictly Necessary Cookies
These toggles control the default consent state sent to Google Consent Mode before user interaction.
Opt-Out Model Configuration (Default Allow)
If you are operating under an opt-out consent model:
Enable all category toggles
Leave consent defaults set to “granted”
Do not enable the “Do Not Sell Personal Info” option (this option is being deprecated and should not be relied upon)
In this model, Google tags are allowed to operate by default, and consent is adjusted only if a user opts out.
Opt-In Model Configuration (Default Deny)
If you are operating under an opt-in consent model:
Ensure all category toggles are disabled
This sets Google Consent Mode defaults to “denied”
Google tags will not fire until the user explicitly grants consent
This configuration aligns with jurisdictions that require explicit user consent prior to tracking.
Consent Events and GTM Behavior
The settings described above influence the consent data emitted by Captain Compliance, including the:
captainComplianceConsent event
This event can be observed in GTM and reflects:
The active consent model
The current consent state for each category
Updates when a user changes their consent preferences
Downstream GTM tags can use this event in combination with consent variables to determine when and whether tags should execute.
Google Consent Mode provides consent signals, but does not by itself control tag execution. GTM triggers and tag configurations must be set up to respect these signals, as covered in related GTM configuration articles.
