Add Google Analytics

Install Google Analytics 4 (GA4) into a website's codebase — the base gtag tag plus event tracking — wiring it into the real framework so pageviews fire on every route and meaningful interactions are tracked. Use this whenever someone wants to add, install, set up, wire up, or instrument Google Analytics / GA4 / gtag / a measurement ID (G-XXXXXXXXXX) on their site, or asks to "track events", "add analytics", "set up conversion tracking", or "get analytics working before launch" — even if they don't name GA4 specifically and even if they just hand you a measurement ID and a repo. Auto-detects the stack (static HTML, React SPA, Next.js, and similar) and writes the install in the idiomatic way for that stack. This skill writes code into the project; it is not an audit-only report.

BreRoz Updated

File contents

BreRoz/ClaudeSkills/tree/main/skills/add-google-analytics commit 68bd69e6b7

Frequently asked questions

npx skillmds@latest add breroz/add-google-analytics