Google Tag Manager tracking-plan workflow

This doc explains the proposed workflow where a tracking plan in Google Sheets is compared against a Google Tag Manager (GTM) container, then implemented in a GTM workspace with preview-first validation.

Use this as the implementation reference for the first “tracking plan > container” MCP skill.

Acronym clarification

  • GTM in this workflow means Google Tag Manager, not go-to-market.
  • Go-to-market workflows are separate and are not part of this automation scope.

What this workflow is solving

Teams currently spend a lot of time in the GTM UI manually checking:

  • whether planned events exist in the container
  • whether tags fire correctly
  • whether required properties are attached
  • whether naming and trigger conditions match the plan

The goal of this MCP workflow is to reduce manual UI work by making the process deterministic:

  1. read plan (Google Sheet)
  2. read current GTM container state
  3. diff + report gaps
  4. create/update a GTM workspace
  5. generate preview URL for validation
  6. keep publish manual (safety gate)

Source-of-truth mapping table (Sheet GTM)

This table shows a recommended column contract for the tracking-plan sheet and how each field maps to GTM entities.

Tracking-plan column (Google Sheet)Example valueGTM entityGTM field(s) / usageNotes
event_namesignup_startedTagTag name, event name parameterCanonical key for matching expected vs actual implementation
event_priorityP1Metadata onlyNaming suffix/label conventionsUseful for rollout ordering; not required by GTM API
event_typetrackTagTemplate selection and payload shapeHelps choose GA4/Segment/custom template
trigger_typecustom_eventTriggerTrigger typeEx: custom event, click, page view
trigger_expressionevent equals signup_startedTriggerFilter predicates/conditionsUsed to detect trigger drift
trigger_scopeall_pagesTriggerPage/path constraintsOptional but important for false-positive prevention
data_layer_eventsignup_startedTriggerCustom event nameOften primary binding key
required_propertiesplan_tier,country,signup_flowTag + VariablesTag params populated from variablesMCP should assert all required properties are mapped
property_allowed_values`plan_tier=freeproenterprise`Validation rule
property_sourcedataLayer.plan_tierVariableVariable definition pathDrives variable creation or update
variable_namedlv - plan_tierVariableVariable nameRecommended naming normalization target
destinationsegmentTagTag template/type and destination configHelps pick correct tag template
workspace_hintrelease-2026-05-signupWorkspaceWorkspace nameOptional but useful for grouped changes
statusplanned / implementedDerivedDiff output stateUsually computed, not authored in GTM
owneranalytics_engMetadata onlyReportingUseful for approvals/escalation

Data pulled by the MCP workflow

From Google Sheets (tracking plan)

  • planned event catalog
  • required properties and allowed values
  • trigger logic expectations
  • variable source definitions (commonly dataLayer paths)
  • implementation status/priority metadata

From Google Tag Manager (via MCP)

  • account/container/workspace inventory
  • tags (name, type/template, parameters, firing setup)
  • triggers (type, conditions, event bindings)
  • variables (name, variable type, source path/config)
  • version/workspace metadata for comparison and preview flow

Important: this workflow mainly pulls configuration metadata, not product analytics event logs. Event-log QA is done downstream in tools like Segment/Mixpanel/GA4.

Why this is useful (business and engineering)

  • Reduces setup and audit time for each new event
  • Prevents silent tracking drift between plan and implementation
  • Improves handoff quality across product, analytics, and engineering
  • Creates repeatable, client-agnostic implementation quality
  • Supports “close to no time in interface” as a measurable operating goal

For each run, return:

  1. Diff summary: missing, mismatched, extra entities
  2. Action plan: exact create/update sequence
  3. Applied changes: what was created/updated in workspace
  4. Preview link: GTM preview URL
  5. Validation checklist: GTM + downstream checks
  6. Publish reminder: manual publish required

Safety guardrails

  • Never auto-publish GTM versions in v1
  • Workspace-only writes
  • Require explicit user confirmation before destructive changes (delete/rename)
  • Record before/after snapshots for traceability