Event Tracking: Measuring What Users Do

Event tracking turns user actions like clicks and purchases into analyzable data. Analytics platforms use this data to report on engagement and conversions. The biggest footgun is inconsistent naming, which pollutes your data and breaks reports.
The mental model
Event tracking is the practice of instrumenting your application to emit signals when users perform meaningful actions. Instead of just seeing raw page views, you get a detailed log of behaviors like addToCart, startVideo, or submitForm. This transforms anonymous traffic into a story about user intent and engagement.
How it works
You add a JavaScript snippet from an analytics provider, like Google's gtag.js, to your website. Then, within your application's code, you call a function like gtag('event', 'login') when a user performs that action. This function sends the event name and optional parameters (e.g., method: 'Google') to the analytics service. The service then processes and aggregates this data into reports. Events are often categorized: some are collected automatically (session_start), some are standardized for industries (purchase), and some are fully custom.
When to use it
Use event tracking to measure key performance indicators (KPIs) tied to business goals. This is essential for tracking sign-ups, monitoring feature adoption, and measuring revenue from purchases. It's the foundation for building conversion funnels to identify where users drop off in a process, like an onboarding or checkout flow. It's also critical for A/B testing to determine which variant drives more of a desired action.
When not to use it
Avoid tracking every single trivial interaction, as this creates noise, can incur costs, and makes analysis difficult. Never track personally identifiable information (PII) in standard event parameters, as this can violate privacy laws like GDPR. The most common mistake is creating a custom event when a standardized "Recommended Event" already exists. Using the standard purchase event, for example, unlocks pre-built e-commerce reports that a custom user_bought_item event would not.
One canonical example
A user clicks a "Sign Up" button on your site. Your website's JavaScript executes gtag('event', 'sign_up', { 'method': 'email' });. In Google Analytics, this registers a sign_up event. Because sign_up is a Recommended Event, GA can automatically use this data in its pre-built reports on user acquisition. The custom method parameter allows you to further segment sign-ups by whether they used email, Google, or another social provider.
Interview question
Which of the following is a key best practice for implementing effective event tracking?
- a.Using consistent naming conventions and prioritizing standardized events.Correct
- b.Including personally identifiable information (PII) to enrich user profiles.
- c.Tracking every user interaction to capture comprehensive data.
- d.Designing unique custom event names for all user actions.
Why? this is the answer
The card highlights that 'inconsistent naming' is the 'biggest footgun' and advises using standardized 'Recommended Events' to unlock pre-built reports. Conversely, it warns against tracking 'every single trivial interaction' and 'personally identifiable information (PII)'.
Just read this? Test yourself on what you have been reading.
Read the original → developers.google.com
You just looked this up. Could you explain it out loud?
That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on analytics — each one lists the topics its interview covers.
See open roles