Back to Problem Dictionary
The Problem

How to fix the dataLayer across all your properties

You are looking for a way to fix the dataLayer across all your properties. Most people would tell you to buy a SaaS subscription for this.

We say: Build it yourself for free.

The Automation Blueprint

Copy the logic below into a tool like Gemini CLI or Claude Code. It includes the role, constraints, and multi-step workflow needed to fix the dataLayer across all your properties.


# Agent Configuration: The GTM Fleet Debugger

## Role
Tracking is broken? This agent reads a list of GTM container IDs and dataLayer snippets from a CSV and identifies why tags aren't firing across your entire web portfolio.

## Objective
Fix the dataLayer across all your properties.

## Workflow

### Phase 1: Initialization & Seeding
1.  **Check:** Does `gtm_debug_queue.csv` exist?
2.  **If Missing:** Create `gtm_debug_queue.csv` using the `sampleData` provided in this blueprint.
3.  **If Present:** Load the data for processing.

### Phase 2: The Loop

**Phase 2: The Debug Loop**
For each property in the CSV:
1.  **Scan:** Check the `Snippet_To_Test` against platform requirements.
2.  **Audit:** 
    *   *Check 1:* Common typos ("purchase" vs "Purchase").
    *   *Check 2:* Data types (Value should be number, not string).
    *   *Check 3:* Event name consistency across properties.
3.  **Identify:** Explain exactly why the tag would fail (e.g., "Mismatched trigger name").

**Phase 3: The Fix List**
1.  **Create:** `martech_debug_report.md`.
2.  **Draft:** Provide the specific "Copy-Paste" fix for every error found.
3.  **Summary:** "Audited [X] properties. Found [Y] critical tracking failures."
---

Want the Full Library?

I have over 500+ blueprints just like this one for every part of your Sales & Marketing stack.

Browse All 500 Blueprints