Custom event
A user-defined tracking event that captures specific interactions beyond pageviews, such as button clicks, form submissions, video plays, or any action meaningful to your business.
Custom events extend analytics beyond automatic pageview tracking to capture specific interactions that matter to your business. While pageviews show which pages visitors view, custom events show what they do on those pages.
Common custom events include button clicks, form submissions, video interactions (play, pause, complete), scroll milestones, feature usage, error occurrences, and any other interaction you want to measure.
Custom events typically include a name (like "signup_click" or "video_play") and optional properties (like video title, button location, or form type). This flexibility lets you track exactly what matters for your specific use case.
Setting up custom events requires adding tracking code to your website that fires when the desired action occurs. Most analytics tools provide simple APIs for this, often just a single function call with the event name and properties.
Frequently asked questions
What should I track with custom events?
Track actions that indicate engagement or progress toward goals: button clicks, form submissions, video plays, feature usage, downloads, and errors. Focus on actions that help you understand visitor behavior and optimize conversions.
How do I set up custom events?
Custom events are typically set up by adding JavaScript code that calls your analytics tool's event tracking function when the desired action occurs. Most tools provide simple APIs like `analytics.track("event_name", {properties})`.
How many custom events should I track?
Start with 5-10 events that directly relate to your business goals. Too many events create noise and analysis paralysis. You can always add more as you identify new questions to answer.