🚀 LEVEL UP TO SENIOR:Unlock 500+ Advanced Practical Challenges & Exercises.
🎓 COURSERA PARTNER:Earn professional Google, Meta, and IBM certificates to supercharge your resume.
HTML MASTER CLASS /// LEARN TAGS /// BUILD STRUCTURE /// SEMANTIC WEB /// HTML MASTER CLASS /// LEARN TAGS ///

Instrumenting the Product

Event-based product analytics tools like Mixpanel and Amplitude answer 'what did this user do,' not just 'how many people visited.'

Total XP: 0|💻 management XP: 0

Skill Matrix

UNLOCK NODES BY LEARNING NEW TAGS.

Select an unlocked node to view details root

🚀 LEVEL UP TO SENIOR:Unlock 500+ Advanced Practical Challenges & Exercises.
🎓 COURSERA PARTNER:Earn professional Google, Meta, and IBM certificates to supercharge your resume.

Data you didn't plan to collect is data you can't trust six months later. Product analytics starts with a plan, not a dashboard.

1Pageview Tools vs. Event-Based Tools

Google Analytics answers 'how did people arrive and which pages did they see' — ideal for marketing sites and top-of-funnel questions. Mixpanel and Amplitude answer 'what did this specific user do, in what order, and did they come back' — the questions a PM actually needs answered to improve activation and retention inside the product itself.

2A Tracking Plan Is a Contract, Not a Suggestion

Before any engineer writes analytics code, the tracking plan should define: the exact event name (snake_case, verb-noun pattern like 'invite_sent'), the properties attached to it (plan tier, source channel), and the owner responsible for validating the event actually fires correctly in staging before it ships to production.

3Step-by-Step Breakdown

Introduction. Google Analytics was built for marketing sites — it excels at pageviews, traffic sources, and sessions. Mixpanel and Amplitude were built for products — they track user-level events ('clicked_export_button', 'completed_onboarding') so a PM can follow one person's journey through the funnel, not just count page loads.

The Tracking Plan Comes Before the Code. Firing events ad hoc leads to a graveyard of inconsistent names — 'Signup', 'sign_up_completed', 'SIGNUP_DONE' all meaning the same thing. A tracking plan is a spreadsheet defining every event name, its properties, and who owns it, written and reviewed before a single event is implemented.

Funnels and Cohorts Reveal What Averages Hide. A funnel report shows the drop-off rate between each step of a flow (e.g. 100% viewed pricing -> 40% started checkout -> 12% completed payment). A cohort analysis groups users by when they signed up, so a PM can see if retention is actually improving release over release, not just averaged across everyone at once.

Knowledge Check. Three engineers independently name the same event 'Signup', 'sign_up_completed', and 'SIGNUP_DONE'. What should have prevented this?

  • A shared tracking plan defining canonical event names and properties before implementation
  • Switching from Mixpanel to Google Analytics, since GA doesn't require event names

Summary. Use pageview analytics (GA) for marketing and acquisition questions, event-based analytics (Mixpanel/Amplitude) for in-product behavior questions, and always start with a written tracking plan so the two years of data you're about to collect is usable, not a naming mess.

Pascual Vila

Pascual Vila

Frontend Instructor // Code Syllabus

Common Pitfalls & Errors

The Error //

Letting engineers name events ad hoc without a tracking plan

// Wrong: 3 different names for the same action across the codebase track('Signup'); track('sign_up_completed'); track('SIGNUP_DONE'); // Correct: one canonical event, defined in the tracking plan track('signup_completed', { source: 'organic', plan: 'free' });

The Solution //

Inconsistent event names ('Signup' vs 'sign_up_completed') silently break every funnel and cohort report built on top of them. Agree on a naming convention and a reviewed tracking plan before any event ships.

The Error //

Using pageview analytics to answer in-product behavior questions

// Wrong: "GA shows 10,000 pageviews on /dashboard, so the feature is working." // Right: "Mixpanel shows 'report_exported' fired for 12% of dashboard visitors — that's the real activation signal."

The Solution //

Google Analytics can tell you a user visited '/dashboard' but not whether they actually used the feature on it. For questions like 'do activated users retain better,' use event-based tools that track user-level actions, not just page loads.

Lesson Glossary

[01]Tracking Plan

A document defining every analytics event's name, properties, and owner before it's implemented, to keep instrumentation consistent.

Code Preview
// Tracking Plan context

[02]Cohort Analysis

Grouping users by a shared starting point (like signup week) to compare their behavior over time, isolating trends averages would hide.

Code Preview
// Cohort Analysis context

Continue Learning