feat: update GTM skills triad with field-tested improvements

gtm-audit (60):
- Added Mode D rule: check elements for IDs before designing CSS triggers

gtm-editor (61):
- Added "Tagging Workflow: dataLayer First" section — always suggest
  dataLayer push code for developers before creating GTM triggers
- Added multi-language snippets (JS, React, Vue, PHP)
- Added "Trigger Design: IDs First" section — prefer element IDs,
  ask user to add IDs before falling back to CSS selectors
- Added ID naming convention: [section]-[element]-[action]
- Added decision tree for trigger selection

gtm-validator (62):
- Flag CSS-based triggers as fragility risk during QA
- Recommend adding IDs instead of finding alternative CSS selectors

Based on field testing with ourdigital.org GTM-N9TPJW container.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-17 21:55:50 +09:00
parent f905ef6314
commit c287ca3340
3 changed files with 111 additions and 1 deletions

View File

@@ -220,5 +220,6 @@ Compare tags between two container versions to identify changes.
- Test on both desktop and mobile viewports when possible
- Check consent mode state before flagging missing tags
- Document every test result with screenshots or network request evidence
- If a trigger selector doesn't match, suggest a fix and hand off to gtm-editor
- **When a trigger uses CSS selectors instead of IDs, flag it as a fragility risk** — recommend adding `id` attributes to the HTML
- If a trigger selector doesn't match, suggest adding an ID to the element first (not a different CSS selector) and hand off to gtm-editor
- GTM questions, best practices, and architecture advice are also in scope