---
name: gtm-what-changed
description: Find out whether a Google Tag Manager change caused a drop or jump in conversions or events - match the date the numbers moved with the GTM version published around then and name the exact tag or trigger change. Use when someone says conversions dropped, an event stopped, Google Ads stopped recording conversions, or asks what changed in Tag Manager. Needs the Caybl.ai connector (gtm_ tools; Google Analytics or Google Ads optional).
---

# What changed in Tag Manager?

Uses the Caybl.ai connector. If its `gtm_` tools aren't available, tell the user to connect Google Tag Manager at https://caybl.ai/dashboard and stop.

## 1. Pin down when the numbers moved

If the user gave a date, use it. Otherwise:
- Google Ads connected: daily conversions for the last 60 days from `get_campaign_performance`.
- Google Analytics connected: `run_report` with dimension `date`, metric `eventCount`, filtered to the affected `eventName` (e.g. `purchase`, `generate_lead`), last 60 days.

Find the first day of the change.

## 2. Find the version

Call `gtm_version_history` with no versions: it compares the live version with the one before and lists recent versions with the day each was saved. If the live version's date doesn't match, call it again with `fromVersion`/`toVersion` for the pair around the change date.

## 3. Name the cause

From the diff, pick the change that affects the event in question:
- a tag **PAUSED**, removed, or sending to a different ID or event name
- a firing trigger changed (compare the old and new conditions: does the new one still match the page or event?)
- a duplicate tag added (numbers jump instead of drop)

Use `gtm_list_tags` (search for the event) to confirm how the tag is set up now.

## 4. Report

One sentence: "Version N, saved on <date>, <change>, which explains <the drop>." Then the evidence (the numbers before and after, and the diff line), and the fix.

If nothing in GTM lines up with the date, say so plainly and suggest other causes: a site release that changed page paths or the dataLayer, consent banner changes, or a change in the ad platform itself.

## 5. Offer the fix

Two options - let the user choose:
- **Roll back:** if the bad change was the only thing in that version, `gtm_publish` with `version` set to the previous version restores it in one step.
- **Fix forward:** draft the specific fix (e.g. `gtm_pause_tag` with `paused: false`), then publish it with `gtm_publish`.

Either way: dry run first (no `validateOnly`), show exactly what changes on the live site, and only call with `validateOnly: false` after the user agrees.
