Sub topic 3
Kinds of events: automatic, enhanced measurement, recommended, custom
This chapter assumes you know that GA4 records every interaction as an event, that a property receives data from one or more data streams, and that you can read basic JavaScript. Here you learn the four event categories, where each one comes from, and how to choose between them.
Why categories matter
Every event in GA4 has the same shape: a name plus a set of parameters. The categories are not different data structures. They describe who sends the event and how much meaning GA4 already attaches to its name.
The category affects three things:
- Whether you need to write any code.
- Whether GA4 reports already know what the event means.
- Whether you can rename or change its parameters safely.
The four categories are:
| Category | Who sends it | Needs your code? | Example names |
|---|---|---|---|
| Automatically collected | The GA4 tag or SDK | No | `first_visit`, `session_start`, `page_view` |
| Enhanced measurement | The GA4 tag, if the stream setting is on | No, only a stream setting | `scroll`, `click`, `file_download` |
| Recommended | You, using Google's names and parameters | Yes | `add_to_cart`, `purchase`, `login` |
| Custom | You, using your own names | Yes | `tutorial_step_completed` |
Automatically collected events
The GA4 tag sends these events as soon as it is installed. You cannot turn most of them off. Several matter because GA4 builds its user and session metrics from them.
first_visitfires the first time a browser or device is seen on the property. GA4 uses it to count new users.session_startfires when a new session begins. GA4 uses it to count sessions.page_viewfires on each page load on web. It is also the event behind page and screen reports.user_engagementfires when the page has been in the foreground for a period of time. It feeds engagement time.
Mobile apps have their own automatic events, such as first_open, screen_view, app_update, and in_app_purchase. Which events exist depends on the platform, so check the list for the stream type you use.
Two points cause confusion:
- Automatic events still count as events. In an events report,
session_startandfirst_visitappear next to your own events. Their counts are real, but they are bookkeeping events rather than user actions. Do not treatsession_startas a measure of "something the user did". - They are not always visible in the same way. Some of them, such as
session_startandfirst_visit, are created by the tag but are excluded from some places, such as the DebugView step list of your own sends. Their absence from your code does not mean they are missing from your data.
Enhanced measurement events
Enhanced measurement is a set of events that the GA4 tag detects in the page itself. You switch them on or off per web data stream in the stream settings. They work without custom code, but only when the page behaves in the way the tag expects.
| Event | Detects | Typical parameters |
|---|---|---|
| `scroll` | The user reaches 90% of page depth | `percent_scrolled` |
| `click` | A click on a link that leads to another domain (outbound) | `link_url`, `link_domain`, `outbound` |
| `file_download` | A click on a link to a common file type | `file_name`, `file_extension`, `link_url` |
| `view_search_results` | A search query appears in the URL | `search_term` |
| `video_start`, `video_progress`, `video_complete` | Playback of an embedded YouTube video | `video_title`, `video_percent` |
| `form_start`, `form_submit` | Interaction with a form | `form_id`, `form_name` |
Page views based on browser history changes (for single-page applications) are also part of this setting.
Limits to know
Enhanced measurement is convenient, and its limits are the usual source of wrong numbers.
- It only exists for web streams. App streams do not have it.
- The
scrollevent fires once per page at 90% depth. It does not describe how far a user scrolled in finer steps. - The
clickevent covers outbound links only. A click on a button or an internal link is not recorded by it. - Video events cover only YouTube embeds that have the JavaScript API enabled. Other players need custom events.
- Form events depend on standard HTML forms. Forms built with scripts that bypass the browser's normal submit behavior can be missed or mis-detected.
- The toggles apply to the whole stream. You cannot enable
scrollfor one page only through the setting.
If you need different behavior, turn the specific toggle off and send your own event instead. Leaving both on produces duplicate events.
Recommended events
Recommended events are names and parameters that Google has defined for common needs. GA4 does not send them for you. You must send them, but when you use Google's exact names and parameter names, GA4 knows what they mean and fills in the matching reports.
Examples by area:
- Ecommerce:
view_item,add_to_cart,begin_checkout,add_payment_info,purchase,refund. - Account:
login,sign_up. - Content and engagement:
search,share,select_content. - Games:
level_up,unlock_achievement.
The next example sends add_to_cart. The event name selects the meaning. The parameters currency and value carry the money. The items array describes the product.
// Send a recommended ecommerce event with parameters and an items array
gtag('event', 'add_to_cart', {
currency: 'USD',
value: 29.99,
items: [
{
item_id: 'SKU_123',
item_name: 'Trail Shoe',
price: 29.99,
quantity: 1
}
]
});Why the exact names matter: the monetization reports read items, value, and currency by name. If you send product_list or amount instead, the event is collected, but those reports stay empty. Recommended events also give you a consistent vocabulary when several people work on the same property.
You do not have to send every parameter Google lists. Required parameters differ per event. For example, ecommerce reports need items, and purchase needs a transaction_id so GA4 can avoid counting a repeated purchase twice. Check Google's reference for the event you use.
Custom events
A custom event is any event whose name is not in the previous three categories. You use it when no recommended event fits your case.
// Send a custom event with a custom parameter
gtag('event', 'tutorial_step_completed', {
step_number: 3,
tutorial_name: 'ga4_data_model'
});GA4 collects this event immediately. The event name shows up in the Events report within the normal processing delay. The parameters step_number and tutorial_name are stored with the event, but they do not appear as dimensions or metrics in standard reports until you register them as custom definitions. A later chapter covers that step. For now, remember that collection and reporting are separate.
Naming rules and limits
- Names are case-sensitive.
Sign_Upandsign_upare two different events. - Use letters, numbers, and underscores. Start with a letter.
- Do not use reserved prefixes such as
google_,ga_, andfirebase_. Reserved names such asfirst_visitorsession_startare also off limits as custom names. - A standard property accepts up to 500 distinct event names per app instance, and each event can carry up to 25 parameters. These limits can change, so check the current documentation for the numbers that apply to you.
- Names and parameter values have length caps. Long values are truncated.
Because names are case-sensitive and there is a cap on distinct names, put a naming convention in place before launch. A common one is lowercase snake_case, with a verb phrase such as video_played rather than a noun such as Video.
Choosing the right category
Work through these questions in order. Stop at the first "yes".
- Does GA4 already send it automatically? Use that event and do not send your own.
- Does an enhanced measurement toggle cover it, and are its limits acceptable? Turn the toggle on.
- Does Google define a recommended event for this action? Send it with the recommended name and parameters.
- Otherwise, send a custom event, and describe the details with parameters rather than new event names.
The last point deserves care. Prefer one event with a parameter over many similar events. Compare these two designs:
| Design | Event names | Result |
|---|---|---|
| Many events | `click_header_signup`, `click_footer_signup`, `click_banner_signup` | Uses three of your distinct names. Adding a fourth location means a new name. |
| One event with a parameter | `signup_click` with `location: 'header'` | One name. Locations are values and can grow freely. |
Verifying what you send
Check events before you trust them. Two tools help:
- DebugView shows events from a device in debug mode in near real time. It lets you see names and parameters one by one.
- Realtime report shows events from the last 30 minutes in aggregate.
When an expected event is missing, check these causes in order: the tag is not on that page, the toggle is off, the event name has a typo or a case difference, or consent settings are blocking collection.
Summary of the model
Automatic and enhanced measurement events cost you nothing in code, but they follow Google's rules. Recommended events cost some code and reward you with ready-made reports. Custom events give you freedom, and in exchange you must register their parameters and manage their names yourself. All four end up as rows of the same kind: an event name, parameters, a timestamp, and a user identifier.
Exercise
A site has enhanced measurement on. A developer adds gtag('event', 'file_download', { file_name: 'guide.pdf' }) to the download link handler. Reports now show roughly twice as many downloads as the server logs. What happened, and what are two ways to fix it?
Show answer
The enhanced measurement toggle already sends file_download for the same click, and the developer's code sends a second event with the same name, so each download is counted twice. Fix it by either turning off the file downloads toggle in the web stream's enhanced measurement settings and keeping the custom code, or removing the custom code and keeping the toggle.
Exercise
You want to record which button a visitor used to start a free trial. There are five buttons. Should you create five custom event names or one? Give the design and one reason.
Show answer
Use one event, for example trial_start_click, with a parameter such as button_id that holds the button's name. One event name keeps you well under the limit on distinct event names, and adding a sixth button needs no new event. To use button_id in standard reports, register it as a custom dimension.
Exercise
You send gtag('event', 'Purchase', { value: 40, currency: 'USD' }) from the checkout page. The ecommerce purchase reports stay empty, though the event appears in the Events report. Why?
Show answer
Event names are case-sensitive. Purchase is a custom event, not the recommended purchase event, so the monetization reports do not read it. The fix is to send purchase in lowercase, and to include transaction_id and the items array.