How to set up GA4 + GTM from zero on a new site
Когда использовать: You have a site live, no tracking yet, and a deadline.
Предварительные требования
- Skill installed — git clone https://github.com/jtrackingai/event-tracking-skill ~/.claude/skills/event-tracking-skill
- GA4 property + GTM container — Create in Google Tag Manager; note GTM-XXXXXX ID
- Service account with Tag Manager API access — GCP console → enable Tag Manager API → service account JSON
Поток
-
Scan the siteScan https://example.com and propose a GA4 event schema (page_view, view_item, add_to_cart, etc.).✓ Скопировано→ Event list with parameters and sample payloads
-
Sync to GTMSync this schema into GTM container GTM-ABCDEF as tags + triggers + variables.✓ Скопировано→ Workspace changes reported
-
Preview and verifyOpen Preview on staging.example.com and verify each event fires.✓ Скопировано→ Per-event fire/miss report
-
PublishPublish version with notes 'initial GA4 setup'.✓ Скопировано→ Live version ID returned
Итог: A GA4-tracked site with events flowing within an hour.
Подводные камни
- Events fire but don't appear in GA4 for 24h — Use DebugView in GA4 for real-time verification while testing
- GTM workspace conflicts with manual edits — Create a dedicated workspace for the skill's changes to avoid stepping on someone else