Sub topic 3
Kinds of Events: Automatic, Enhanced Measurement, Recommended, and Custom
This chapter assumes you know what a web page or app screen is, understand the purpose of analytics, and can read basic JavaScript. The examples use the Google tag (gtag) on a website.
GA4 uses an event to record something that happened. An event might record a page view, a file download, a product added to a cart, or a step completed in a tutorial. GA4 groups events into four practical categories:
| Event category | How it is collected | When to use it |
|---|---|---|
| Automatically collected | GA4 collects it without extra event code | For basic activity such as sessions or first visits |
| Enhanced measurement | You enable a setting in the web data stream | For common website interactions |
| Recommended | You send a Google-defined event name and parameters | For supported business actions |
| Custom | You define the event name and parameters | When no suitable standard event exists |
Automatically collected events
Automatically collected events need no additional event call. GA4 can collect events such as first_visit, session_start, and user_engagement. The exact events depend on the platform and implementation.
These events provide basic context about activity. You generally should not send a second event with the same meaning. For example, manually sending your own session_start event would create a different event. It would not replace GA4's session logic.
Enhanced measurement events
Enhanced measurement adds common website interactions through a setting on the web data stream. Depending on the settings you enable, GA4 can collect events such as:
page_viewwhen a page loadsscrollwhen a visitor reaches a scroll thresholdclickfor outbound link clicksview_search_resultsfor site searchesfile_downloadfor downloadable files- Video engagement events for supported embedded videos
Enhanced measurement reduces code, but it is not always a perfect description of your business activity. A download link might not follow the expected file pattern. A single-page application might need careful page-view configuration. Test the resulting events instead of assuming that the setting captures every interaction correctly.
Recommended events
Recommended events use names and parameter structures documented by Google for common actions. Examples include login, sign_up, purchase, and add_to_cart.
You must implement recommended events. GA4 does not know when a visitor completes your checkout unless your site sends that event. Use the documented name and parameters so that reports and integrations can interpret the data consistently.
// Send a recommended ecommerce event after the product enters the cart.
gtag('event', 'add_to_cart', {
currency: 'USD',
value: 29.99,
items: [
{
item_id: 'SKU_123',
item_name: 'Trail Shoe',
price: 29.99,
quantity: 1
}
]
});Custom events
Use a custom event when no recommended event describes the action. Choose a stable, specific name such as tutorial_step_completed, rather than a vague name such as action.
gtag('event', 'tutorial_step_completed', {
step_number: 3,
tutorial_name: 'ga4_data_model'
});Custom parameters are collected with the event. To use them as fields in standard GA4 reports, register them as custom dimensions or metrics. Registration does not change old data retroactively.
Common errors
- Sending
page_viewmanually while automatic page views are still enabled, which can double-count views. - Using
purchasewithout its required ecommerce parameters. - Naming equivalent events differently across websites or apps.
- Creating many custom events when one documented recommended event would work.
- Assuming that an event name alone makes its parameters available in every report.
Exercise
A checkout system records a completed order. Should it use an automatically collected event, an enhanced measurement event, a recommended event, or a custom event?
Show answer
Use the recommended purchase event and send the documented purchase parameters. A completed order is a standard business action, not a basic page interaction.