Sets up and debugs GA4 and consent mode v2 in Google Tag Manager. Helps with Google tags, GA4 events, cookie banners, consent checks, and duplicate or missing GA4 data.
Ships in gtm-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Read ga4-consent.md first. To decide which events to measure, use gtm-tracking-plan. Apply changes with gtm-safe-edit; without it, work in a new workspace, show the changes and get approval before publishing.
| Source | How |
|---|---|
| MCP tools | list_tags, list_triggers, list_variables, get_tag |
gtm-cli | gtm-cli tags list, gtm-cli triggers list, gtm-cli variables list, gtm-cli tags get; see the gtm-cli skill |
| Export JSON | Read container-export.md first |
| Neither | For setup, work from the goals. For debugging, ask for an export |
Follow ga4-setup.md.
| Symptom | Check |
|---|---|
| Events or page views counted twice | Two Google tags for one ID (resolve variables); several firing triggers on one tag; gtag.js or a platform integration also on the page; history-change page views on single-page sites |
| Purchases counted twice | The above, plus a transaction_id that is empty or differs between hits, which defeats GA4 deduplication |
| Events missing | Trigger event name matches the push exactly; consent state at fire time; blocking triggers; variables resolving to empty |
| Wrong values | Hardcoded parameters; variable path does not match the push; ecommerce data not enabled |
| Consent ignored | No default set; CMP fires too late; tag without a consent requirement; consent requirement on a tag that was meant to send cookieless pings |
Whether to block Google tags until consent (basic) or let them send cookieless pings (advanced) is a legal and business decision: explain both and ask.
| Mode | Google tags | Other marketing tags |
|---|---|---|
| Advanced | Rely on built-in consent checks; add no consent requirement | Require consent |
| Basic | Require additional consent | Require consent |
A tag blocked for missing consent is not replayed when the visitor accepts. Also trigger it on the CMP's consent event, and set it to fire once per page. Set consent defaults with the CMP's template, not a Custom HTML tag.
State the cause with the entity names, the fix as a target configuration that follows ga4-consent.md, how to verify it in Preview mode and GA4 DebugView, and what only the site or GA4 can confirm.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
google-tag-manager, ga4, consent-mode, tag-debugging, analytics-setup
7 skills in this plugin
/gtm-cliOperates Google Tag Manager through the gtm-cli command-line tool, including authentication checks, ID discovery, JSON input files and safety rules. Use when a shell is available and GTM must be read or changed without an MCP server, or when a gtm-cli command fails./gtm-container-auditAudits a Google Tag Manager container and scores it against best practices. Use when asked to review, audit, clean up or health-check a GTM setup or a container export JSON./gtm-mcpExplains how to operate the GTM MCP Server, including ID discovery, tool input formats and safety guards. Use when its GTM tools are available or a tool rejects JSON input./gtm-skills:gtm-ga4-consentfrom gtm-skills
npx claudepluginhub paolobietolini/gtm-mcp-server --plugin gtm-skillsOther plugins' skills for the same job