Set Up Consent Mode
Choose the correct consent setup for tags managed in Google Tag Manager, selected Shopify properties, or an AnyTrack-enabled CMP integration, then verify that each tag receives the expected consent state.
How consent reaches your tags depends on where those tags are managed. Choose the setup that matches Google Tag Manager, Shopify, or a direct consent management platform (CMP) integration.
Choose Your Consent Setup
Section titled “Choose Your Consent Setup”Google Tag Manager
Use this path when the AnyTrack Tracking Tag and your third-party tags are managed in Google Tag Manager.
Set the GTM consent defaults
Configure your CMP to set consent defaults using the Consent Initialization - All Pages trigger.
Install the AnyTrack template
Install the AnyTrack GTM template from the GTM Community Template Gallery and enter your AnyTrack Property ID.
Set the AnyTrack trigger
Set the AnyTrack tag to trigger on All Pages, after the CMP sets the consent defaults.
Configure consent checks for your tags
Configure the consent checks required by each Google or third-party tag managed in GTM.
The AnyTrack GTM template reads all four Consent Mode v2 types, sends a full consent snapshot to AnyTrack, and listens for later changes. Tags managed in GTM follow the consent settings configured in GTM.
How consent flows with Google Tag Manager
From the visitor choice to a full consent snapshot in AnyTrack
Visitor makes a consent choice
Your CMP sets the consent defaults, then records the visitor choice as a consent update in GTM.
Consent Initialization - All Pages AnyTrack template reads the consent state
The AnyTrack GTM template reads all four Consent Mode v2 signals and listens for later changes.
ad_storage / analytics_storage / ad_user_data / ad_personalization Each tag receives its consent state
The template sends the full consent snapshot to AnyTrack. Tags managed in GTM follow the consent checks configured in GTM.
Shopify
Use this path when your consent banner saves choices through the Shopify Customer Privacy API.
Configure the consent banner
Configure a Shopify-compatible consent banner.
Request Shopify consent sync
Ask AnyTrack support to enable Shopify consent sync for the Property.
Test the consent flow
Test the banner after support confirms that the feature is enabled.
AnyTrack then reads the saved Shopify choice and listens for banner updates.
No custom setConsent callback is required.
- Shopify marketing controls
ad_storageandad_personalization. - Shopify analytics controls
analytics_storage. ad_user_datais granted only when both marketing and sale-of-data consent are granted.
How consent flows with Shopify
From the banner choice to the tags AnyTrack loads
Visitor saves a choice in the banner
The consent banner stores the visitor choice in Shopify.
Shopify Customer Privacy API AnyTrack reads the saved choice
With Shopify consent sync enabled for the Property, AnyTrack reads the stored choice and listens for banner updates.
Signals reach AnyTrack-loaded tags
AnyTrack maps the Shopify categories to the four consent signals and applies them to the tags it loads.
marketing / analytics / sale of data Direct CMP
Use this path when the CMP is installed directly on your website and you want AnyTrack-managed Google or Microsoft tags to receive its choices.
Configure the default state
After support enables the feature, open Property Settings → Consent Mode (beta) and configure the default state for each signal.
Map the CMP categories
Map the CMP categories to the four signals listed below.
Send consent updates
Call setConsent after the CMP restores a saved choice and
whenever the visitor accepts, rejects, or changes consent:
AnyTrack('setConsent', { ad_storage: marketingStorageAllowed ? 'granted' : 'denied', analytics_storage: analyticsStorageAllowed ? 'granted' : 'denied', ad_user_data: advertisingDataAllowed ? 'granted' : 'denied', ad_personalization: personalizationAllowed ? 'granted' : 'denied',});Replace the example variables with the values returned by your CMP. Send all four fields in the first call so the initial state is complete.
How consent flows with a direct CMP
From the CMP choice to the tags AnyTrack loads
CMP collects the visitor choice
The CMP shows the banner, stores the choice, and restores it on later visits.
Your site sends the consent state
Your setConsent call sends the four signals to AnyTrack after each restore or change.
AnyTrack('setConsent', ...) AnyTrack applies the signals
Google and Microsoft tags loaded by AnyTrack receive the current consent state.
Consent Signals and Destinations
Section titled “Consent Signals and Destinations”Map CMP categories by purpose, not only by their labels. One “Marketing” category does not always cover every advertising purpose.
| Signal | Purpose to map in your CMP |
|---|---|
ad_storage | Advertising or marketing storage |
analytics_storage | Analytics storage |
ad_user_data | Sending user data for advertising |
ad_personalization | Personalized advertising and remarketing |
Tag Compatibility
Section titled “Tag Compatibility”This table applies to tags loaded by AnyTrack.
| Tag | Status | Consent handling |
|---|---|---|
| Google Ads | ✅ Supported* | Receives all four Consent Mode v2 signals |
| Google Analytics 4 | ✅ Supported* | Receives all four Consent Mode v2 signals |
| Microsoft Advertising UET | ✅ Supported* | Receives ad_storage |
| Meta Pixel | 🕒 Coming soon | Manage consent through your CMP or GTM |
| TikTok Pixel | 🕒 Coming soon | Manage consent through your CMP or GTM |
| Outbrain Pixel | 🕒 Coming soon | Manage consent through your CMP or GTM |
| Taboola Pixel | 🕒 Coming soon | Manage consent through your CMP or GTM |
* For tags loaded by AnyTrack, Shopify consent sync or AnyTrack Consent Mode must be enabled for the Property. Tags installed in GTM use the consent state and consent checks configured in GTM and do not require AnyTrack Consent Mode access.
Verify the Setup
Section titled “Verify the Setup”Check the initial state
Open a private browser window before interacting with the banner. Confirm that the defaults configured in GTM, Shopify, or AnyTrack are active.
Test every relevant choice
Accept and reject each CMP category. Confirm that GTM or the enabled AnyTrack integration receives the expected four-signal state after each choice.
Test a returning visitor
Reload the page and confirm that the CMP or Shopify restores the saved choice. Use Google Tag Assistant or Microsoft UET Tag Helper for the relevant tags.
Related Guides
Section titled “Related Guides”- Install the AnyTrack Tracking Tag
- Install AnyTrack with Google Tag Manager
- Connect Google Ads
- Connect Microsoft Ads
- Set up the Shopify integration
- Google Consent Mode
- Microsoft UET Consent Mode
Consent Mode FAQs
FAQ was last reviewed on 2026-07-28
Does AnyTrack configure consent for every third-party tag?
Can I send only the field that changed?
setConsent calls can contain only changed fields. Send all four fields in the first call to establish a complete state.