[00] Subset Opt-Out, User guide
Google Tag Manager
Last updated
How Subset Opt-Out passes each visitor's choice to Google Tag Manager through Consent Mode and dataLayer events, and how to gate other tags.
Subset Opt-Out doesn’t block Google Tag Manager. It tells the container about each visitor’s choice in two ways: Google Consent Mode, which Google’s own tags read, and two dataLayer events you can use to gate every other tag. Both are on by default.
What works
- Consent Mode for Google tags. Before any tag loads, Subset Opt-Out sends
gtag('consent', 'default', …)and then an update with the visitor’s state, the order Google’s Consent Mode guide (opens in a new tab) asks for. Tags with built-in consent checks, such as Google Analytics and Google Ads, follow it. Global Privacy Control lists which consent type follows which category. - Events for everything else. Subset Opt-Out pushes
subset_cm_consent_readyonce per page view andsubset_cm_consent_updatewhenever the visitor changes their choice. Both carrysubset_cm, withfunctional,statisticsandmarketingset totrueorfalse, andsource. - The same HTML for every visitor. Both parts run in the browser, so page caching keeps working.
What needs a setting
Leave Send Consent Mode signals to Google tags on, under 6. Google Consent Mode on Subset → Opt-Out. Redact ad click identifiers while ad storage is denied is on by default and recommended.
Tags that aren’t Google’s, such as a Meta pixel in a Custom HTML tag, need one of these in Tag Manager:
- In the tag’s Advanced Settings → Consent Settings, choose Require additional consent for tag to fire and add
ad_storage(Google on consent settings (opens in a new tab)). - Or fire the tag from a Custom Event trigger on
subset_cm_consent_ready, with a condition on a Data Layer Variable forsubset_cm.marketing(Google on Custom Event triggers (opens in a new tab) and Data Layer Variables (opens in a new tab)).
An opt-out stops advertising only, unless you turn on Opt-out also covers analytics under 5. What an opt-out covers. With it off, analytics_storage and subset_cm.statistics stay granted after an opt-out.
Known limits
- Subset Opt-Out can’t hold tags Tag Manager adds. They’re added while the page runs, after Subset Opt-Out has checked the HTML. Use the consent settings or triggers above.
- The container must load after
wp_headstarts. The Consent Mode script prints atwp_headpriority 2. A container snippet pasted abovewp_head()in your theme loads before the default consent state is set. - Custom data layer names need a filter. If your container uses a name other than
dataLayer, a developer can send the events there withsubset_cm_datalayer_name, in the developer reference. Consent Mode always usesdataLayer.