google-tag-manager

google-tag-manager is a cursor rule for Cursor from thatrebeccarae/claude-marketing. It costs 59 tokens per session (2,029 once invoked), scanned A, original, MIT.

A set of rules for working with Google Tag Manager, a tool for managing website tracking tags. It covers container reviews, tag and trigger design, debugging, consent mode v2, and server-side tagging.

In plain words
What is it for?
Use it to audit GTM containers, plan tags and triggers, investigate why tracking does not fire, configure consent mode v2, or advise on server-side tracking.
Why use it?
It helps find unused or duplicate tags, incorrect firing conditions, missing consent settings, and other tracking setup problems.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it to audit GTM containers, plan tags and triggers, investigate why tracking does not fire, configure consent mode v2, or advise on server-side tracking.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/thatrebeccarae/claude-marketing/google-tag-manager
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/thatrebeccarae/claude-marketing

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for google-tag-manager

README.md
[![agentmods](https://agentmods.dev/badge/rules/thatrebeccarae/claude-marketing/google-tag-manager/github.svg)](https://agentmods.dev/rules/thatrebeccarae/claude-marketing/google-tag-manager)
Your own site
<a href="https://agentmods.dev/rules/thatrebeccarae/claude-marketing/google-tag-manager"><img src="https://agentmods.dev/badge/rules/thatrebeccarae/claude-marketing/google-tag-manager/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for google-tag-manager

Your own site · 80×15
<a href="https://agentmods.dev/rules/thatrebeccarae/claude-marketing/google-tag-manager"><img src="https://agentmods.dev/badge/rules/thatrebeccarae/claude-marketing/google-tag-manager.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,029 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00059 $0.02029
Opus 5 $0.00030 $0.01014
Sonnet 5 $0.00012 $0.00406
Haiku 4.5 $0.00006 $0.00203

Measured 10d ago against content hash 1dcbac5bb248, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

google-tag-manager scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

integrations/cursor/google-tag-manager.mdc · 129 lines

How it starts

The opening of the file, as written. The whole thing — 129 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

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

Read the full file on GitHub · 129 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 129 lines · 59 tokens per session scan A 1dcbac5bb248

Subscribe to this mod's changes

google-tag-manager is a cursor rule published in the GitHub repository thatrebeccarae/claude-marketing (133 stars, last pushed 3mo ago), licensed MIT. It adds 59 tokens to every session and 2,029 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.