Skip to content

Set Up Consent Mode

Choose the correct consent setup for tags managed in Google Tag Manager, selected Shopify properties, GoHighLevel, 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, GoHighLevel, 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

GoHighLevel

Use this path when your GoHighLevel cookie banner offers Essential and Non-Essential choices and you want AnyTrack-managed Google or Microsoft tags, or the Meta Pixel, to receive the visitor’s choice.

1

Configure the GoHighLevel banner

Enable the cookie consent banner in GoHighLevel. See How to use the cookie consent banner.

2

Configure the default state

After support enables Consent Mode, open Property Settings → Consent Mode (beta) and set all four signals to Default denied.

3

Add the consent adapter

Add this code immediately after the AnyTrack Tag in the GoHighLevel page header or head tracking code:

<script>
window.addEventListener(
'LCCookieConsentDoneGTag',
({ detail }) => {
const value = detail.gtag === 'grant' ? 'granted' : 'denied';
AnyTrack('setConsent', {
ad_storage: value,
analytics_storage: value,
ad_user_data: value,
ad_personalization: value,
});
},
false,
);
</script>

GoHighLevel exposes one Non-Essential decision through this documented event, so the adapter applies that choice to all four signals. It does not need to read GoHighLevel cookies.

How consent flows with GoHighLevel

From the Essential or Non-Essential choice to the tags AnyTrack loads

1
visitor

Visitor saves a banner choice

GoHighLevel stores the visitor’s cookie consent choice.

Essential / Non-Essential
2
update

GoHighLevel emits the consent event

The adapter maps grant to granted and every other value to denied for all four signals.

LCCookieConsentDoneGTag
3
result

Signals reach AnyTrack-loaded tags

AnyTrack applies the current state to the tags it loads.

AnyTrack('setConsent', ...)

Direct CMP

Use this path when the CMP is installed directly on your website and you want AnyTrack-managed Google or Microsoft tags, or the Meta Pixel, 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 and the Meta Pixel loaded by AnyTrack receive their supported consent signals.

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✅ Supported*Uses ad_storage for the browser Pixel’s consent state
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 configured default consent state is active.

2

Test every relevant choice

Accept and reject each consent category. Confirm that the enabled integration receives the expected state after each choice.

3

Test a returning visitor

Reload the page and confirm that the saved choice is restored.

Use the relevant tag helper to confirm that each tag loads only once.

Consent Mode FAQs

FAQ was last reviewed on 2026-08-13

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 and applies ad_storage to the browser Meta Pixel it loads. Configure all other third-party tags in your CMP or tag manager.
Which Consent Mode signal controls the Meta Pixel?
Only ad_storage controls the browser Meta Pixel. Set it through one of the supported Consent Mode setup paths and establish an explicit default before the Tracking Tag loads. analytics_storage, ad_user_data, and ad_personalization do not control the browser Pixel.
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, GoHighLevel, 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.