Skip to main content
短.be

Event Tracking

A method of measuring user interactions that do not involve page transitions, such as button clicks, video plays, and file downloads.

Nov 20, 2025 · About 1 min read

Analytics

Event tracking is an analytics method that measures specific user actions on a website or app - button clicks, form submissions, video plays, file downloads, and more - as individual events. It captures detailed in-page user behavior that page views alone cannot reveal.

Google Analytics 4 (GA4) adopts an event-based measurement model, recording all user interactions as "events." There are three types: automatically collected events (page_view, scroll, click, etc.), recommended events (login, purchase, sign_up, etc.), and custom events (arbitrary events you define yourself).

Click measurement for shortened URLs is a classic use case for event tracking. URL shortening services record an event each time a link is clicked, accumulating data on click counts, the clicker's country, device, browser, and click timestamp. Combined with GA4 event data, this enables end-to-end analysis from click through to post-click user behavior (page views, conversions, etc.).

In GA4, event tracking is implemented using the gtag.js gtag('event', ...) function. For example, to measure CTA button clicks, you would add gtag('event', 'cta_click', {button_text: 'Sign Up Now'}) to the button's onclick handler. Google Tag Manager (GTM) lets you configure events without editing code directly.

A critical aspect of event design is defining the events to track in advance and maintaining consistent naming conventions. Adding events ad hoc leads to scattered data that is difficult to analyze. It is recommended to standardize event names in snake_case and document parameter types and value ranges. Related books are also available on Amazon.

Share on XHatena

Was this article helpful?

Related Terms

Related Articles

FAQ

What is the difference between event tracking and page views?
Page views measure page loads, while event tracking measures specific in-page actions (button clicks, scrolling, video plays, etc.). Multiple events can occur within a single page view.
How do I set up custom events in GA4?
Either add gtag('event', 'event_name', {parameters}) to your code, or configure triggers and tags in Google Tag Manager. GTM allows adding and modifying events without code changes, making it accessible for marketers as well.
Can tracking too many events affect performance?
Within normal ranges (a few dozen events per page), the impact is negligible. However, sending unlimited events for high-frequency actions like scrolling or mouse movement can increase network load. Use debouncing or sampling to keep it under control.

Ready to create a short URL?

Shorten a URL for Free