Skip to content

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.

Google Tag Manager

Use this path when the AnyTrack Tracking Tag and your third-party tags are managed in Google Tag Manager.

1

Set the GTM consent defaults

Configure your CMP to set consent defaults using the Consent Initialization - All Pages trigger.

2

Install the AnyTrack template

Install the AnyTrack GTM template from the GTM Community Template Gallery and enter your AnyTrack Property ID.

3

Set the AnyTrack trigger

Set the AnyTrack tag to trigger on All Pages, after the CMP sets the consent defaults.

4

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

1
visitor

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
2
anytrack

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
3
result

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.

1

Configure the consent banner

Configure a Shopify-compatible consent banner.

2

Request Shopify consent sync

Ask AnyTrack support to enable Shopify consent sync for the Property.

3

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_storage and ad_personalization.
  • Shopify analytics controls analytics_storage.
  • ad_user_data is 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

1
visitor

Visitor saves a choice in the banner

The consent banner stores the visitor choice in Shopify.

Shopify Customer Privacy API
2
anytrack

AnyTrack reads the saved choice

With Shopify consent sync enabled for the Property, AnyTrack reads the stored choice and listens for banner updates.

3
result

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.

1

Configure the default state

After support enables the feature, open Property Settings → Consent Mode (beta) and configure the default state for each signal.

2

Map the CMP categories

Map the CMP categories to the four signals listed below.

3

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

1
visitor

CMP collects the visitor choice

The CMP shows the banner, stores the choice, and restores it on later visits.

2
update

Your site sends the consent state

Your setConsent call sends the four signals to AnyTrack after each restore or change.

AnyTrack('setConsent', ...)
3
result

AnyTrack applies the signals

Google and Microsoft tags loaded by AnyTrack receive the current consent state.

Map CMP categories by purpose, not only by their labels. One “Marketing” category does not always cover every advertising purpose.

SignalPurpose to map in your CMP
ad_storageAdvertising or marketing storage
analytics_storageAnalytics storage
ad_user_dataSending user data for advertising
ad_personalizationPersonalized advertising and remarketing

This table applies to tags loaded by AnyTrack.

TagStatusConsent 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 soonManage consent through your CMP or GTM
TikTok Pixel🕒 Coming soonManage consent through your CMP or GTM
Outbrain Pixel🕒 Coming soonManage consent through your CMP or GTM
Taboola Pixel🕒 Coming soonManage 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.

1

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.

2

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.

3

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.

Consent Mode FAQs

FAQ was last reviewed on 2026-07-28

Does AnyTrack configure consent for every third-party tag?
No. Tags managed in GTM follow their GTM consent settings. When the feature is enabled, AnyTrack applies the supported signals to Google and Microsoft tags managed by AnyTrack. Configure all other third-party tags in your CMP or tag manager.
Can I send only the field that changed?
For an enabled direct CMP integration, later setConsent calls can contain only changed fields. Send all four fields in the first call to establish a complete state.
How do I request Shopify or direct CMP consent access?
Open the support chat from the AnyTrack dashboard and provide your Property name, Property ID, platform, CMP, and the consent setup you need enabled.
Does Consent Mode replace my CMP?
No. Your CMP collects and stores the visitor's choice. AnyTrack uses that choice to update supported connected tags.