Set up analytics by working backwards from decisions, not data: start with the questions you need answered, then track only the events that inform an action. Name events with a consistent object-action pattern (signup_completed, cta_clicked) in lowercase with underscores, and keep context in properties rather than the event name. For a marketing site plus product, the essentials are cta_clicked, form_submitted, signup_completed, feature_used, and purchase_completed, tagged with standard properties like source, medium, and plan. Validate everything in GA4 DebugView and GTM Preview before shipping, and keep PII out of properties.
When to use it
Your agent reaches for this skill when you ask for things like:
What's inside
The playbook covers
Reference library — 3 deep-dives
See it in action
Help me set up analytics tracking for our B2B SaaS product. We use GA4 and GTM. We need to track signups, feature usage, and upgrade events.
Event | Properties | Trigger signup_completed | method, plan, source | success page cta_clicked | button_text, location| CTA click feature_used | feature_name | in-app action purchase_completed | plan, value | payment success
gtag('event', 'signup_completed', { 'method': 'email', 'plan': 'free' });
FAQ
How should I name analytics events?
Use an object-action format in lowercase with underscores — signup_completed, form_submitted, cta_hero_clicked. Be specific (cta_hero_clicked beats button_clicked) and push context into properties instead of bloating the event name. Establish the convention before you implement anything and document it, so your events stay consistent and queryable as the plan grows.
Why don't my GA4 numbers match my database?
Common causes are duplicate tags firing (two GTM containers or a trigger firing twice), consent-mode filtering, ad blockers, and differences between client-side and server-side counting or session timeouts. Debug systematically: watch events in GA4 DebugView, test triggers in GTM Preview, and check for deduplication. Client-side analytics will almost always undercount versus a server-side source of truth.
What UTM parameters should I use?
Standardize source (google, meta, newsletter), medium (cpc, paid-social, email, organic-social), and campaign (a named convention with a date or identifier), plus content and term where relevant. Keep everything lowercase and consistent, avoid redundant or vague values like "cta1," and log every UTM in a shared spreadsheet so channels stay comparable and reporting doesn't fragment.
Related skills
Build a tool for this workflow?
Marketers run this skill mid-task — the exact moment your tool matters. Partner tiers put your tool inside the skill their agent runs.
See partner tiers