consent-audit
Skill4 starsChanged 31 days agoMITView on GitHub
Check that Tag Manager tags respect consent, covering a Consent Mode v2 default on Consent Initialization, consent settings on every ads and analytics tag, vendor pixels, and the site-side region logic. Use when the user says "consent mode", "GDPR/cookie banner check", "are tags respecting consent", "Consent Mode v2", "cookie consent audit", or before running ads to opt-in regions.
In this repository13 other files it gives its agents.
- ads-auditSkill
- campaign-architectSkill
- demand-gen-launchSkill
- event-auditSkill
- gtm-buildSkill
- monthly-reportSkill
- performance-insightsSkill
- pre-launch-checkSkill
- search-launchSkill
- setupSkill
- tracking-auditSkill
- tracking-planSkill
- weekly-checkSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 6 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Before advertising to visitors in opt-in regions (for example the EEA and the UK).
- Very specific: line 15
After a new consent banner (CMP), a new vendor pixel, or a gtm-build session.
- Very specific: line 25
Call account_profile first.
- Very specific: line 39
Consent default: Look for a tag that fires on the Consent Initialization trigger (built-in trigger ID 2147479572 in firingTriggerId): the …
- Distinctive: line 45
No such tag means either the site sets the default in code before the GTM snippet (ask the developers to confirm, step 4) or there is no …
- Very specific: line 49
high: no consent default; a vendor ad pixel with notSet/notNeeded.
- Very specific: line 50
All Pages that sets cookies before the default.
- Distinctive: line 83
Never present the result as legal compliance.
- Distinctive: line 84
Never grant consent by default in an opt-in region, or suggest region logic that fails open.
- Distinctive: line 85
Never remove or pause the consent banner's own tags.
- Distinctive: line 86
Never publish without showing the workspace diff and getting a yes.
- Very specific: line 87
If the profile is read-only (no write tools), deliver steps 1–4 and tell the user that fixing needs npx google-marketing-agent accounts set …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Consent audit
Tags that fire before or without consent break the law in opt-in regions and, since Consent Mode v2, lose remarketing and conversion modelling in Google Ads. This skill reads the container, classifies every tag, checks the consent default, and gives the user's developers a short checklist for what Tag Manager can't see.
When to use
- Before advertising to visitors in opt-in regions (for example the EEA and the UK).
- After a new consent banner (CMP), a new vendor pixel, or a
gtm-buildsession. - Ads shows Consent Mode warnings, or remarketing lists stopped growing.
Inputs
accountwithgtmContainerIdset (check withaccount_profile; thesetupskill adds it).- The regions the site serves that require opt-in, and the consent banner in use.
Steps
Call account_profile first. Consent rules: guide("measurement"); tag recipes and the publish checklist:
guide("gtm").
- Inventory.
gtm_listwithentity: "tags", thengtm_geton every active tag for itstype,firingTriggerIdandconsentSettings. Classify:awct(Ads conversion),sp(Ads remarketing),gclidw(conversion linker): ads tags. All needad_storage; conversion and remarketing tags alsoad_user_data, remarketing alsoad_personalization.googtag(Google tag),gaawe(GA4 event): analytics tags, needanalytics_storage.html,imgand community templates that load vendor pixels (social, affiliate, heatmap, chat): read their code; ad pixels need the ads types, analytics toolsanalytics_storage.- Google tags (
awct,sp,gclidw,googtag,gaawe) read Consent Mode themselves: with a correct default they send cookieless signals while denied (advanced mode). Requiring consent on them (consentStatus: "needed") blocks them fully (basic mode). Both are valid; it's the user's legal choice. Non-Google tags have no built-in check:consentStatusnotSetornotNeededon them means they fire regardless.
- Consent default. Look for a tag that fires on the Consent Initialization trigger (built-in trigger ID
2147479572infiringTriggerId): the CMP's template or a Consent Mode template. Withgtm_get, check that it:- sets a default for all four Consent Mode v2 types:
ad_storage,analytics_storage,ad_user_data,ad_personalization; - defaults to denied in opt-in regions (a region list on the default, or denied everywhere);
- updates consent when the visitor chooses (the CMP's update call), and the banner itself loads. No such tag means either the site sets the default in code before the GTM snippet (ask the developers to confirm, step 4) or there is no default at all, which is a high finding. Only consent and CMP tags belong on Consent Initialization.
- sets a default for all four Consent Mode v2 types:
- Findings. Table with severity, tag, type, current
consentSettings, problem, fix:- high: no consent default; a vendor ad pixel with
notSet/notNeeded; a tag on Consent Initialization or All Pages that sets cookies before the default;ad_user_data/ad_personalizationmissing from the default. - medium: Google tags in basic vs advanced mode not matching what the user intends; custom HTML that injects
gtag()consent calls outside the CMP;<noscript>image pixels in the page source. - low: consent settings on tags that are paused anyway.
- high: no consent default; a vendor ad pixel with
- Developer checklist (what the container can't show):
- The consent default runs before any tag: the GTM snippet or the in-code default comes first in
<head>. - Region gate fails closed: grant only on an explicitly allowed region, never
region !== "<restricted>"; an unknown or failed lookup means denied, and a guessed region is never persisted (cookie or storage). <noscript>pixels can't be consent-gated: remove them in consent regions.- Vendor pixels hard-coded in the site move into Tag Manager so they inherit the consent gate.
- The banner's choice reaches Tag Manager as a consent update (check in Tag Assistant's Consent tab).
- The consent default runs before any tag: the GTM snippet or the in-code default comes first in
- Fixes, each a preview first and applied only after a yes:
- Consent on an existing tag, recipe-built or not: always
gtm_upsertwithentity: "tags",id, and onlyconsentSettingsinresource(the shallow merge keeps its parameters and triggers). Nevergtm_buildwith anidfor a consent change: an update replaces every setting the recipe doesn't model. - Types per tag: GA4 event tags (
gaawe) needanalytics_storage; Ads conversion tags (awct) needad_storageandad_user_data, plusad_personalizationwhen they feed remarketing. For an Ads tag:resource: { consentSettings: { consentStatus: "needed", consentType: { type: "list", list: [{ type: "template", value: "ad_storage" }, { type: "template", value: "ad_user_data" }] } } }. - A missing consent default: install the CMP's Tag Manager template on Consent Initialization (community
templates are added in the Tag Manager interface), then configure it with
gtm_upsert. - Review and publish as in the
gtm-buildskill:gtm_versionswithversionId: "workspace"shown in full,gtm_publishwith a dated name after a yes, rollback version noted, thengtm_live_check.
- Consent on an existing tag, recipe-built or not: always
Output
- The tag inventory with classification and consent status.
- The consent-default check (present / missing, types covered, region behaviour).
- The findings table and the fixes applied (change IDs, published version).
- The developer checklist.
- The closing line: "This is a technical check, not legal advice."
Never
- Never present the result as legal compliance; always close with "This is a technical check, not legal advice."
- Never grant consent by default in an opt-in region, or suggest region logic that fails open.
- Never remove or pause the consent banner's own tags.
- Never publish without showing the workspace diff and getting a yes.
- If the profile is read-only (no write tools), deliver steps 1–4 and tell the user that fixing needs
npx google-marketing-agent accounts set <alias> writes trueand an MCP client restart.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

