Event Tracking
Definition
Recording specific user interactions on your website, like button clicks, video plays, or form submissions. Essential for understanding user behaviour beyond page views.
What is Event Tracking?
Event tracking records specific actions users take on your website. Unlike page views, which track automatically, events capture interactions like button clicks, video plays, file downloads, scroll depth, and form submissions.
In Google Analytics 4, everything is technically an event – including page views. But "event tracking" typically refers to custom events beyond the basics.
Why Event Tracking Matters
Page views only tell you which pages people visited. Event tracking reveals what they did on those pages:
- Did they click your call-to-action button?
- How far did they scroll?
- Did they watch your video?
- Did they open the FAQ accordion?
- Did they start filling out the form?
This behaviour data shows what's working and what isn't.
Common Events to Track
Engagement Events
Scroll depth, time on page, element visibility, outbound link clicks
Interaction Events
Button clicks, form starts, video plays, tab switches, accordion opens
Conversion Events
Form submissions, purchases, sign-ups, downloads, phone calls
E-commerce Events
Product views, add-to-cart, checkout steps, purchase
How to Set Up Event Tracking
Enhanced Measurement (GA4)
GA4 automatically tracks some events: scrolls, outbound clicks, site search, video engagement, file downloads. Enable in your data stream settings.
Google Tag Manager
For custom events, use Google Tag Manager. Set up triggers (button click, form submission) and create tags that fire event data to GA4.
Code-Based
Developers can push events directly using the gtag() function or data layer.
Event Naming Best Practices
Use clear, consistent names:
- form_submit (not "FormSubmit" or "formsubmit")
- video_play (not "video play" or "VideoPlay")
- Use underscores, lowercase, and be descriptive