# Writing the change list

The audit never edits the container. Fixes leave the agent as a written change list that a person with Edit access applies in a named workspace and the container owner publishes. Template: [../assets/change-list-template.md](../assets/change-list-template.md).

## Batches and order

- Batch 1, permission and secrets: consent gates and defaults, exposed credentials, compromised code. Ship first.
- Batch 2, counting and values: broad or duplicate conversion paths, order IDs and values, retired or wrong destinations, settings that exclude data.
- Batch 3, attribution and session: Google tag duplication and settings, page view ownership, sequencing, server routing.
- Batch 4, hygiene: paused and unused items, naming, folders, notes. Always its own release, so a naming change never hides inside a measurement change.
- Batches 1 to 3 may share a release when each request is tested on its own. A secret is rotated by its owner before the tag that exposed it is removed, so the old value stops working at once.

## Rules for each request

- One request per hypothesis. "Purchase double counts" is one request; renaming tags and removing old pixels are others. Mixing them makes the main fix impossible to verify.
- A test depends only on its own change. If it also needs another fix, make that fix its own request and reference it.
- Every request names the baseline (container, live version ID and name, read time) and the finding IDs it closes.
- Name entities by name and ID with type and the current setting quoted from the file. "Fix the purchase tag" is not actionable.
- Say what could break. Removing a page-based purchase path can drop a checkout that still depends on it; deleting the visible duplicate can leave the weaker sender in charge.
- Every request has a test with its approval and test data ([runtime-tests.md](runtime-tests.md)) and lists the destination records the test creates.
- Every request has a rollback (the version to republish) and says what the rollback does not undo: user permissions and destination links (not versioned), data already sent, CMP or site code changes, anything outside the container version. Before relying on a rollback for a Settings tab change, check in the version comparison whether that change is in the version.
- When a fix will lower a reported number, say so in the request and tell the reporting owner before the release, so a correction is not read as a performance drop.
- Name who applies, who verifies at the destination and, on Tag Manager 360 with approvals, the approver.

## Closing a request: the verification loop

1. Before editing, export the live version (the baseline file).
2. After editing, export the workspace and run `node <skill-folder>/scripts/diff-gtm-exports.mjs baseline.json workspace.json` from the audit folder. Pass: the diff shows only the intended change; every risky line (consent loosened, consent types reduced, exception removed, trigger added to a conversion, conditions changed on a conversion trigger, destination or label changed, code changed, credential-like value changed) is one the request names. Credential-like values print masked (first four characters and the length), so a rotated secret shows as "(value changed)" and the diff output can be attached to the request.
3. Run the audit on the workspace export with the same config. Pass: the request's finding IDs are gone and no new P1 or P2 FAIL appears (a workspace export adds an R14 INFO line, which is not scored).
4. Run the request's runtime test and record the result in the evidence file.
5. After publishing, re-export the live version, re-run the audit and attach the output to the request.

A request closes on three answers: the configuration changed as written (diff), runtime behaviour matched (Preview record), the destination received the event once (DebugView, platform diagnostics or an order ID match). A yes to the first does not stand in for the other two.

## Example requests (fictional Acme Store, GTM-XXXXXXX, live version 42)

```markdown
### CR-1 Stop Meta Purchase firing on consent changes, without consent and without an event ID
- Closes: R06:tag:10:consent-event-15 (FAIL P1), R01:tag:10:no-gate (FAIL P1), R13:tag:10:no-event-id-meta (FAIL P2)
- Batch: 1
- Entity: tag "Meta Pixel - Purchase" [10], type html, consent "No additional consent required",
  firing triggers "CE - purchase" [10] and "CE - cookie_consent_update" [15].
- Change: remove trigger [15]. In the tag's consent settings choose "Require additional consent for tag to fire"
  with ad_storage, ad_user_data and ad_personalization. Create Data Layer Variable "DLV - event_id" (key event_id,
  version 2) and pass it as the fourth fbq argument: { eventID: {{DLV - event_id}} }, unquoted.
  Do not reuse "Exception - marketing denied" [17]: it blocks only on "denied" and fails open.
- Why: every banner interaction records a purchase; the tag claims no consent need while sending to Meta; the server
  container also sends Meta Purchase, and Meta pairs the two only on matching event name and event ID.
- Could break: nothing that is correct today. Meta Purchase counts fall; paid social owner told on 2026-11-01.
- Test (staging, test order reference ACME-TEST-001, Meta test event code, approved by the paid social owner):
  1. Fresh profile, accept all, click the banner twice: no Meta Purchase request.
  2. Fresh profile, ignore the banner, complete the test order: no Meta request; in Tag Assistant, any Google Ads
     tag that ran shows ad_storage denied (advanced mode, per decisions.md).
  3. Fresh profile, reject marketing, complete the test order: no Meta request.
  4. Fresh profile, accept marketing, complete the test order: exactly one browser Purchase with eventID X;
     server Preview shows the Conversions API Purchase with event_id X; Events Manager shows them deduplicated.
- Destination records: four staging orders; Meta test events only.
- Re-audit: diff shows tag [10] and the new variable only; the three finding IDs are gone; no new P1 or P2 FAIL.
- Rollback: republish version 42. Does not undo: purchases already sent to Meta, the staging orders.
- Applies: web analytics lead. Verifies at destination: paid social owner (Events Manager test events).

### CR-2 Wire GA4 purchase to the global purchase trigger and restore its ecommerce source
- Closes: R07:tag:4:host-scope-11 (FAIL P2), R07:tag:4:scoped-11 (WARN P2), R12:tag:4:ecommerce-type (FAIL P2),
  R12:tag:4:ecommerce-source (WARN P2)
- Batch: 2
- Entity: tag "GA4 - purchase" [4], gaawe, fires on "CE - purchase - shop host" [11] (Page Hostname equals
  shop.example.com); sendEcommerceData stored as TEMPLATE "true", no getEcommerceDataFrom.
- Change: fire on "CE - purchase" [10]; in the tag's ecommerce settings tick Send Ecommerce data, choose the
  data layer as the source and save in the UI; read the tag back and check sendEcommerceData is BOOLEAN and
  getEcommerceDataFrom is stored.
- Why: purchases on www.example.com are dropped, and the purchases that fire carry settings the API stored broken.
- Could break: if the shop-only scope was intended (written nowhere), confirm with the GA4 owner first.
- Depends on: CR-4 and CR-15 (remove the Measurement Protocol backup and the wildcard forwarder); until both ship,
  GA4 still receives two or three purchases per order (R23).
- Test (staging or test payment method, agreed references, GA4 debug mode): one order on each of www and shop;
  DebugView shows one purchase each with transaction_id, value, currency and items.
- Rollback: republish version 42. Does not undo: purchases already collected without items.
- Applies: web analytics lead. Verifies at destination: GA4 owner (DebugView).

### CR-3 Remove debug_mode from the agency Google tag
- Closes: R20:tag:2:debug-mode (FAIL P1; P1 because the Developer traffic data filter is Active)
- Batch: 2
- Entity: tag "GA4 - Config (agency copy)" [2], googtag, configSettingsTable row debug_mode = "false".
- Change: delete the row. Do not set it to false; Google's DebugView help says false does not turn debug mode off.
- Why: every visitor whose page loads this tag is marked as debug traffic, and the Active Developer traffic filter
  excludes it from GA4 for good. CR-17 later removes the duplicate Google tag itself (R03).
- Could break: nothing. GA4 sessions and users rise from the release date; the GA4 owner annotates the date.
- Test (no form, order or consent click): before publishing, open Preview, find tag [2] under Tags Fired and check
  that its configuration settings no longer list debug_mode. Preview and Tag Assistant turn on debug mode for the
  tester's own browser, so their collect requests always carry the debug flag and prove nothing here. After
  publishing, load a production page in a fresh profile with no Tag Assistant connection and no gtm_debug parameter:
  the collect requests carry no debug flag (look for _dbg; confirm the parameter name in DevTools), and DebugView
  stops listing ordinary visitors' devices.
- Rollback: republish version 42. Does not undo: traffic already excluded by the filter, which GA4 never processes.
- Applies: web analytics lead. Verifies at destination: GA4 owner (production requests and DebugView).
```

## Release evidence to ask for

The person who applies the list returns, per request: the workspace diff output (credential-like values are already masked in it), the audit re-run output, the runtime evidence entry, and after publishing, the new live version ID and the post-publish smoke test result.
