Agent skill

Google Tag Manager

by thatrebeccarae in thatrebeccarae/claude-marketing

Google Tag Manager expertise. An agent skill from thatrebeccarae/claude-marketing.

MITAuto-check passedMarketing & SEO

Install Google Tag Manager

skills CLI
$ npx skills add thatrebeccarae/claude-marketing --skill google-tag-manager -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install thatrebeccarae/claude-marketing google-tag-manager --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/thatrebeccarae/claude-marketing.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/google-tag-manager .claude/skills/google-tag-manager && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
google-tag-manager
GitHub stars
161
Token cost
~2.6k tokens
SKILL.md length
1,313 words
Files
4
Skills in repo
55
Repo updated
First seen
Licence
MIT

At a glance

Google Tag Manager expertise. An agent skill from thatrebeccarae/claude-marketing.

  • Works in 8 steps: Conversion Tracking Verification —… → Tag Inventory — List all tags: name,… → Trigger Review — List all triggers with… → …
  • Debug firing issues
  • SKILL.md covers Install, Core Capabilities, Workflow: Full Container Audit and Hard Rules, plus 2 more sections
  • Calls git

What it does

Google Tag Manager is an agent skill from thatrebeccarae/claude-marketing. Google Tag Manager expertise. Audit GTM containers, design tag and trigger architecture, debug firing issues, implement consent mode v2, and advise on server-side tagging. Use when the user asks about GTM, tag management, container audits, consent mode, server-side tagging, or tracking implementation.

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files (for example `EXAMPLES.md` and `REFERENCE.md`).

It sits in Marketing & SEO, covering Go-to-market strategy and Backend development. It works with Google Analytics. The repository describes itself as: A full marketing department for Claude Code. Skill packs for Klaviyo, Shopify, GA4, Looker Studio, paid media, and more. Audit, optimize, and report using natural language. The licence is MIT.

When your agent uses it

  • Debug firing issues
  • Implement consent mode v2
  • Advise on server-side tagging
  • The user asks about GTM

Example prompts

  • “/google-tag-manager”

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Conversion Tracking Verification — Confirm GA4 config tag exists, measurement ID stored in a constant variable (not hardcoded), enhanced…
  2. Tag Inventory — List all tags: name, type, status (paused/enabled), firing trigger, tag firing options (unlimited/once per page/once per…
  3. Trigger Review — List all triggers with conditions. Flag any conversion or remarketing tag attached to an All Pages trigger. Check trigger…
  4. Variable Audit — Confirm recommended built-in variables are enabled (Page URL, Page Path, Click Classes, Click ID, Form ID). Check all…
  5. Organization Check — Is there a folder structure? Are workspaces named descriptively or all in "Default Workspace"? Review publish history…
  6. Naming Convention Assessment — Do tag/trigger/variable names follow a consistent framework? Can a new team member understand the…
  7. Consent Mode Check — Does a consent default tag exist firing on Consent Initialization? Is it configured with all four parameters? Does a…
  8. Prioritized Recommendations — Compile all findings. Rank by impact (revenue/data quality/compliance risk) and effort (Low/Medium/High)…

What it can do on your machine

Read from SKILL.md and the folder at commit a8a63ec. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Google Tag Manager loads about 2.6k tokens when it runs. Until then it costs about 80 tokens; SKILL.md has 1,313 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~80
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from thatrebeccarae/claude-marketing at commit a8a63ec, republished under its MIT licence (© thatrebeccarae). 1,313 words, ~2,572 tokens.

Download SKILL.mdSave it as .claude/skills/google-tag-manager/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
google-tag-manager
description
Google Tag Manager expertise. Audit GTM containers, design tag and trigger architecture, debug firing issues, implement consent mode v2, and advise on server-side tagging. Use when the user asks about GTM, tag management, container audits, consent mode, server-side tagging, or tracking implementation.
license
MIT
origin
custom
author
Rebecca Rae Barton
author_url
https://github.com/thatrebeccarae
metadata.version
1.0.0
metadata.category
analytics
metadata.domain
google-tag-manager
metadata.updated
2026-03-18
metadata.tested
2026-03-18
metadata.tested_with
Claude Code v2.1

Google Tag Manager

Expert-level guidance for Google Tag Manager — auditing containers, designing tag and trigger architecture, debugging firing issues, implementing consent mode v2, and advising on server-side tagging.

Install

bash
git clone https://github.com/thatrebeccarae/claude-marketing.git && cp -r claude-marketing/skills/google-tag-manager ~/.claude/skills/

Core Capabilities

Container Auditing and Optimization

Full container audit covering the six core areas: overview stats, tag inventory, trigger review, variable audit, folder organization, and naming convention assessment. Identifies unused tags, duplicate GA4 config tags, over-broad triggers on conversion tags, undefined variable paths, and consent mode gaps. Produces prioritized recommendations ranked by impact and effort.

Tag Architecture

Expert guidance on all common tag types:

  • GA4 Configuration (gaawc) — one per domain, holds measurement ID (always via constant variable), enhanced conversions settings, and shared config. All GA4 event tags must reference this as their Configuration Tag.
  • GA4 Event (gaawe) — fires individual events with parameters sourced from data layer variables. References the gaawc config tag.
  • Google Ads Conversion Tracking — conversion ID + label, value and currency from data layer, deduplication tag ID for enhanced conversions.
  • Google Ads Remarketing — conversion ID, custom parameters for audience building.
  • Meta Pixel — base code + standard events (PageView, ViewContent, AddToCart, InitiateCheckout, Purchase). Use community template from Template Gallery rather than custom HTML.
  • Custom HTML — unsandboxed JavaScript, creates CSP risk. Only use when no Template Gallery alternative exists.
  • Community Templates — vetted third-party templates for Cookiebot, OneTrust, HotJar, Meta Pixel, LinkedIn Insight Tag, and more. Always prefer over Custom HTML.
Trigger Design

Matching triggers to tags with correct scoping is the single biggest factor in data quality. See REFERENCE.md for the full trigger type taxonomy. Key principles:

  • Page Load triggers (Page View, DOM Ready, Window Loaded) for analytics tags that need the DOM
  • Custom Event triggers for data layer events — exact match on event name
  • Element Visibility for scroll depth and above-the-fold measurement
  • Consent Initialization trigger for consent defaults — must fire before all measurement tags
  • Never use All Pages trigger for conversion or remarketing tags
Variable Strategy

Data Layer Variables (v2) are the correct pattern for capturing tracking values. Key strategy:

  • Use constant variables for all measurement IDs, API keys, and container IDs — one update propagates everywhere
  • Data Layer Variables with dot-notation paths for nested ecommerce objects (ecommerce.value, ecommerce.transaction_id)
  • Lookup Table variables for mapping internal category names to tracking values
  • Custom JavaScript variables for derived values — note sandbox limitations (no DOM, no fetch, no async)
  • Event Settings Variable to share a reusable set of GA4 event parameters across multiple event tags

Four consent parameters control how Google tags behave when users deny consent:

  • analytics_storage — GA4, Google Analytics
  • ad_storage — Google Ads cookie storage
  • ad_user_data — sending user data to Google Ads for matching
  • ad_personalization — remarketing and personalization features

Advanced mode (recommended for DTC): Tags fire cookieless on deny, enabling Google's conversion modeling. Requires wait_for_update so the CMP has time to resolve user choice before tags fire.

Implementation sequence is order-sensitive — default consent must fire before any measurement tags load. See REFERENCE.md Consent Mode v2 section for full implementation details.

Server-Side GTM

Server-side GTM moves tag processing from the browser to a server container (GCP or alternative), improving data quality, blocking ad blocker impact, and enabling server enrichment. Key decision factors: ad blocker loss rate, privacy requirements, Meta CAPI needs, budget for hosting (~$30-50/mo on GCP), and technical capacity for setup.

The server container has no automatic access to browser consent state — consent must be explicitly passed from the browser in the request to the sGTM endpoint.

Debugging
  • Preview mode — activates the GTM debugger in a paired browser tab. Left panel shows event timeline; right panel shows tag firing status, variable values, and data layer state at each event.
  • Tag Assistant — integrated with GTM Preview. Consent tab shows consent parameter state at each event.
  • Browser console — window.dataLayer inspection, filter by event name
  • Network tab — GA4 collect requests, verify parameters, check gcs parameter for consent state

Workflow: Full Container Audit

When asked to audit a GTM container:

  1. Conversion Tracking Verification — Confirm GA4 config tag exists, measurement ID stored in a constant variable (not hardcoded), enhanced conversions enabled, Google Ads conversion tags present and correctly configured.

  2. Tag Inventory — List all tags: name, type, status (paused/enabled), firing trigger, tag firing options (unlimited/once per page/once per event). Flag unused, paused, or duplicate tags.

  3. Trigger Review — List all triggers with conditions. Flag any conversion or remarketing tag attached to an All Pages trigger. Check trigger conditions for URL specificity on conversion triggers.

  4. Variable Audit — Confirm recommended built-in variables are enabled (Page URL, Page Path, Click Classes, Click ID, Form ID). Check all user-defined variables — are any returning undefined? Verify data layer variable paths match actual dataLayer push structure.

  5. Organization Check — Is there a folder structure? Are workspaces named descriptively or all in "Default Workspace"? Review publish history — how many versions, how often, are descriptions informative?

  6. Naming Convention Assessment — Do tag/trigger/variable names follow a consistent framework? Can a new team member understand the container? Flag inconsistency as a maintenance risk.

  7. Consent Mode Check — Does a consent default tag exist firing on Consent Initialization? Is it configured with all four parameters? Does a CMP template exist? Is TCF v2.3 compatible? Verify in Preview mode Consent tab.

  8. Prioritized Recommendations — Compile all findings. Rank by impact (revenue/data quality/compliance risk) and effort (Low/Medium/High). Lead with quick wins.

Show full SKILL.md (441 more words)Show less

Hard Rules

Non-negotiable constraints in every recommendation:

  1. Never recommend DOM scraping when data layer is available. CSS selector or JS variable sniffing is fragile. Data layer is the contract between dev and analytics.
  2. Never recommend All Pages trigger for conversion tags. Conversion and remarketing tags on All Pages inflate costs and corrupt attribution.
  3. Never recommend Custom HTML when a community template exists. Community templates are sandboxed and vetted. Custom HTML runs unsandboxed and creates CSP/security risk.
  4. Always verify consent mode default fires before measurement tags load. Wrong initialization order means consent is not applied — a compliance failure.
  5. Always recommend constant variables for measurement IDs. Never hardcode a measurement ID, conversion ID, or API key directly in a tag. One update should propagate everywhere.
  6. Always flag deprecated Universal Analytics tags for removal. UA was fully sunsetted July 2024. Dead tags in a container are clutter and a warning sign about overall maintenance.
  7. Always clear previous ecommerce data before a new ecommerce push. dataLayer.push({ ecommerce: null }) before each push prevents data from a prior event contaminating the next.
  8. Never skip workspace isolation. One change set per workspace. Never work in Default Workspace. Named workspaces with descriptive names are the expert standard.
  • google-analytics skill — For GA4 data analysis after GTM implementation. GTM configures the tags; the google-analytics skill covers metrics, dimensions, reports, and attribution analysis on the data those tags collect.
  • gtm-implementer agent — For writing GTM changes via the GTM API. Handles workspace preflight, rate-limited variable/trigger/tag creation, and payload construction. The google-tag-manager skill is the analysis layer; the gtm-implementer agent is the execution layer. When a user asks to implement GTM changes (not just audit or advise), point them to the agent.

How to Use This Skill

Ask questions like:

  • "Audit our GTM container — we think some tags are not firing correctly"
  • "Set up consent mode v2 in GTM with Cookiebot. We sell to EU customers."
  • "Our GA4 purchase event is firing but transaction value shows as undefined in DebugView"
  • "Should we go server-side with GTM? We are losing about 15% of data to ad blockers"
  • "Review our naming conventions and tell me what needs to change"
  • "Our conversion tags are firing on every page — help me scope them correctly"
  • "What triggers should we use for a Shopify store with GA4, Google Ads, and Meta Pixel?"
  • "Debug why our Add to Cart event stopped firing"

For complete tag type reference, trigger taxonomy, variable types, consent mode v2 parameters, sGTM architecture details, naming conventions, and anti-patterns, see REFERENCE.md.

For worked examples of container audits, consent mode setup, tag firing debug, and sGTM advisory, see EXAMPLES.md.

© thatrebeccarae, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files in skills/google-tag-manager of thatrebeccarae/claude-marketing.

  • SKILL.md
  • EXAMPLES.md
  • LICENSE
  • REFERENCE.md

Open the folder on GitHubat commit a8a63ec

Compare with similar skills

Google Tag Manager next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Google Tag Manager compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Google Tag Manager this skillthatrebeccarae/claude-marketing161—~2.6kAutomated safety check: PassMIT
Google Tag ManagerVKirill/claude-lane-stack122—~3.1kAutomated safety check: PassMIT
Tracking Discoverjtrackingai/analytics-tracking-automation142—~614Automated safety check: PassApache-2.0
Gtm Auditcognyai/claude-code-marketing-skills104—~1.6kAutomated safety check: PassNone
Tracking Live Gtmjtrackingai/analytics-tracking-automation142—~721Automated safety check: PassApache-2.0
Gtm Setupcognyai/claude-code-marketing-skills104—~4.8kAutomated safety check: NotesNone

Similar skills

  • Google Tag Manager

    VKirill/claude-lane-stack

    [RU: gtm, тег менеджер, google tag manager, контейнер, теги, триггеры, переменные, публикация версии, откат] GTM API v2 full read + write — Account/Container/Workspace hierarchy…

    122 GitHub stars~3.1k tokensUpdated yesterday
    Backend & APIsAuto-check passed
  • Tracking Discover

    jtrackingai/analytics-tracking-automation

    A skill your agent uses when the user wants crawl coverage, platform detection, dataLayer discovery, or a fresh artifact directory before grouping and schema work.

    142 GitHub stars~614 tokensUpdated 5 mo ago
    Marketing & SEOAuto-check passed
  • Gtm Audit

    cognyai/claude-code-marketing-skills

    Google Tag Manager container audit — tag health, orphaned and paused tags, duplicate GA4 config, trigger coverage, Consent Mode, naming, workspace hygiene

    104 GitHub stars~1.6k tokensUpdated 3 mo ago
    Marketing & SEOAuto-check passed
  • Tracking Live Gtm

    jtrackingai/analytics-tracking-automation

    A skill your agent uses when the user wants to inspect the real live GTM runtime before schema generation or compare multiple live GTM containers.

    142 GitHub stars~721 tokensUpdated 5 mo ago
    Marketing & SEOAuto-check passed
  • Gtm Setup

    cognyai/claude-code-marketing-skills

    GTM Event Tracking & Setup Reference — dataLayer fundamentals, trigger types, variable types, GA4 tag configuration, debug mode, and best practices

    104 GitHub stars~4.8k tokensUpdated 3 mo ago
    Marketing & SEOAuto-check: notes
  • Tracking Schema

    jtrackingai/analytics-tracking-automation

    A skill your agent uses when the user wants schema preparation, event design, selector validation, schema review, or event-spec generation.

    142 GitHub stars~1.1k tokensUpdated 5 mo ago
    Marketing & SEOAuto-check passed

More from thatrebeccarae/claude-marketing

All 55 skills in this repo
  • Google Analytics

    thatrebeccarae/claude-marketing

    Analyze Google Analytics data, review website performance metrics, identify traffic patterns, and suggest data-driven improvements.

    161 GitHub starsUsed in 3 repos~1.3k tokens
    Auto-check: notes
  • Content Creator

    thatrebeccarae/claude-marketing

    Comprehensive content marketing toolkit with brand voice analysis, SEO optimization scripts, content frameworks, social media strategy, and content calendar planning.

    161 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Klaviyo Analyst

    thatrebeccarae/claude-marketing

    Klaviyo marketing operations and analyst expertise. An agent skill from thatrebeccarae/claude-marketing.

    161 GitHub stars~5k tokensUpdated 4 mo ago
    Auto-check: notes
  • Klaviyo Developer

    thatrebeccarae/claude-marketing

    Klaviyo API and developer integration expertise. An agent skill from thatrebeccarae/claude-marketing.

    161 GitHub stars~4.9k tokensUpdated 4 mo ago
    Auto-check: notes
  • Looker Studio

    thatrebeccarae/claude-marketing

    Looker Studio (formerly Google Data Studio) expertise. An agent skill from thatrebeccarae/claude-marketing.

    161 GitHub stars~3.6k tokensUpdated 4 mo ago
    Auto-check: notes
  • Shopify

    thatrebeccarae/claude-marketing

    Shopify e-commerce platform marketing expertise. An agent skill from thatrebeccarae/claude-marketing.

    161 GitHub stars~2.4k tokensUpdated 4 mo ago
    Auto-check: notes

Categories

Questions about Google Tag Manager

What does Google Tag Manager do?

Google Tag Manager expertise. An agent skill from thatrebeccarae/claude-marketing. Google Tag Manager is an agent skill from thatrebeccarae/claude-marketing. Google Tag Manager expertise.

When should I use Google Tag Manager?

Google Tag Manager fits situations like: debug firing issues; implement consent mode v2; advise on server-side tagging; the user asks about GTM.

How do I install Google Tag Manager in Claude Code?

Run `npx skills add thatrebeccarae/claude-marketing --skill google-tag-manager -a claude-code`. Or copy the skill folder (skills/google-tag-manager in thatrebeccarae/claude-marketing) into .claude/skills/google-tag-manager in your project. Claude Code loads it when a task matches its description.

How do I install Google Tag Manager in Codex?

Run `npx skills add thatrebeccarae/claude-marketing --skill google-tag-manager -a codex`. Or copy the skill folder (skills/google-tag-manager in thatrebeccarae/claude-marketing) into .agents/skills/google-tag-manager in your project. Codex loads it when a task matches its description.

Can I use Google Tag Manager in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add thatrebeccarae/claude-marketing --skill google-tag-manager -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/google-tag-manager, .gemini/skills/google-tag-manager, .github/skills/google-tag-manager and .opencode/skills/google-tag-manager in your project.

What does Google Tag Manager need to run?

Going by SKILL.md and its folder, Google Tag Manager needs the command-line tools its instructions call (git).

Does Google Tag Manager access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Google Tag Manager safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Google Tag Manager use?

Google Tag Manager is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Google Tag Manager use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Google Tag Manager?

Skills that share tags, products or a category with Google Tag Manager: Google Tag Manager (VKirill/claude-lane-stack, 122 stars), Tracking Discover (jtrackingai/analytics-tracking-automation, 142 stars), Gtm Audit (cognyai/claude-code-marketing-skills, 104 stars) and Tracking Live Gtm (jtrackingai/analytics-tracking-automation, 142 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Google Tag Manager?

thatrebeccarae (a GitHub user) maintains it in thatrebeccarae/claude-marketing, which has 161 GitHub stars. The repository holds 55 skills in this directory. The repository was last updated on May 14, 2026.

Source: thatrebeccarae/claude-marketing on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.