Skip to content

[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_ready once per page view and subset_cm_consent_update whenever the visitor changes their choice. Both carry subset_cm, with functional, statistics and marketing set to true or false, and source.
  • 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:

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_head starts. The Consent Mode script prints at wp_head priority 2. A container snippet pasted above wp_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 with subset_cm_datalayer_name, in the developer reference. Consent Mode always uses dataLayer.