Sub topic 2
Four kinds of events
This chapter assumes you have a GA4 property with a web data stream, know the left-hand navigation, and understand that every GA4 hit is an event with parameters (the previous chapter). Here you learn how to sort any event you see in a report into one of four kinds, and why that choice decides who has to do the work of collecting it.
Why the kind matters
GA4 does not store different kinds of records. A page_view, a file_download, and a newsletter_signup are all events with a name and parameters. The four kinds describe who is responsible for sending the event and how much of its name and parameters are fixed.
| Kind | Who sends it | Names and parameters |
|---|---|---|
| Automatically collected | The Google tag or SDK, always | Fixed by Google |
| Enhanced measurement | The Google tag, if the setting is on | Fixed by Google |
| Recommended | You, with your own code or tag | Names and parameters suggested by Google |
| Custom | You | Anything you choose, within limits |
The kind affects three things you will meet later in the Events report: whether you can turn the event off, whether GA4 already knows what its parameters mean, and whether you must register parameters before you can report on them.
Automatically collected events
These events are sent as soon as the Google tag (gtag.js) or the Firebase SDK is running. You cannot switch them off from the interface. On a web stream the ones that matter most for engagement reports are:
page_view: sent when a page loads. In a standard installation it comes from the tag's configuration call.session_start: marks the start of a session. The next chapters on sessions build on it.first_visit: sent the first time a browser visits, which is how GA4 counts new users.user_engagement: sent when the page loses focus or the user leaves, and it carries theengagement_time_msecparameter. This is how engagement time is accumulated, so it is the raw material for the engagement metrics later in this tutorial.
App streams add events such as first_open and app_remove, which this tutorial does not use.
You will rarely see session_start, first_visit, and user_engagement in the interface as things you act on. They are bookkeeping. Treat them as part of how GA4 builds sessions and users, not as user behavior you should optimize.
Enhanced measurement events
Enhanced measurement is a group of events that the tag detects from browser behavior, with no code from you. It is a set of toggles in Admin > Data streams > your web stream > Enhanced measurement. The common events are:
| Event | Fires when | Notable parameters |
|---|---|---|
| `page_view` | A page loads, and optionally when the browser history changes in a single-page app | `page_location`, `page_referrer` |
| `scroll` | A user first reaches about 90% of the page height | `percent_scrolled` |
| `click` | A user clicks a link that leads away from your domain | `link_url`, `outbound` |
| `view_search_results` | A page URL contains a search query parameter | `search_term` |
| `video_start`, `video_progress`, `video_complete` | An embedded YouTube video with the JavaScript API enabled plays | `video_title`, `video_percent` |
| `file_download` | A user clicks a link to a common file type such as PDF, DOC, XLS, or ZIP | `file_name`, `file_extension` |
| `form_start`, `form_submit` | A user first interacts with a form, then submits it | `form_id`, `form_name` |
Two details cause confusion:
- The outbound link event is named
click, notoutbound_click. To isolate outbound clicks you filter on theoutboundparameter being true. scrollfires once per page view at 90%. It does not tell you that a user read the page, and it does not report 25% or 50% depth.
You can turn off individual toggles. If you do, the event stops being collected from that point forward. Nothing is backfilled when you turn it on again.
Recommended events
A recommended event is one you send yourself, using a name and parameter set that Google has defined for a common use. Examples are login, sign_up, search, share, generate_lead, add_to_cart, and purchase.
You gain two things by using the documented name instead of inventing your own:
- GA4 knows what the event means, so some reports and features, such as the ecommerce reports, work without extra setup.
- Other people who work on the property, and Google's documentation, use the same vocabulary.
You still write the code. For example, a sign-up recorded with the recommended name looks like this:
// Recommended event: name and the "method" parameter follow Google's documentation
gtag('event', 'sign_up', {
method: 'Google'
});A common mistake is to use the right name with different parameter names, for example signup_method instead of method. The event still arrives, but features that expect the documented parameter cannot use your value.
Custom events
A custom event is any event whose name is not in Google's lists. You choose the name and the parameters. This is the right tool when you need to measure something specific to your site, such as a newsletter form in a footer.
// Send a custom event with a parameter from a page that already loads gtag.js
gtag('event', 'newsletter_signup', {
placement: 'footer'
});After this runs, newsletter_signup appears by name in the Events report, usually within a day. The placement parameter does not appear as a report column yet. To break the event down by placement you must register placement as a custom dimension, which a later chapter covers.
Before you invent a name, check whether a recommended event already fits. If you use newsletter_signup where sign_up or generate_lead would describe the action, you lose the built-in meaning for no benefit.
Naming rules and limits
These limits apply to a standard property. Check Google's current documentation, because the numbers can change.
- Event names are case-sensitive.
Newsletter_Signupandnewsletter_signupare two different events, and a typo creates a second row in the Events report. - Names must start with a letter and contain only letters, numbers, and underscores. They are limited to 40 characters.
- Names must not start with the reserved prefixes
ga_,google_, orfirebase_, and must not reuse the name of an automatically collected event. - An event can carry up to 25 parameters. Parameter names are limited to 40 characters and values to 100 characters.
- A property can collect up to 500 distinct event names. Generating names dynamically, such as
click_followed by a button label, can exhaust this limit quickly and is a common design error. Put the variable part in a parameter instead.
// Avoid: one event name per button creates many distinct events
gtag('event', 'click_pricing_button');
gtag('event', 'click_contact_button');
// Prefer: one event name, with the variable part in a parameter
gtag('event', 'cta_click', {
cta_name: 'pricing'
});Telling the kinds apart in practice
To classify an event in your own property, open Reports > Engagement > Events and look at the event names. Then ask three questions in order:
- Is the name one of the always-on events, such as
session_start? It is automatically collected. - Is it one of the enhanced measurement names, and is the matching toggle on? Then the tag is sending it.
- Is it in Google's recommended list, but you see it only because your developers implemented it? It is a recommended event.
Anything left over is custom. If a name looks like a typo of a documented event, for example file_downlaod, treat it as a custom event someone created by mistake and fix the source.
Common errors
- Sending the same action twice. If enhanced measurement already sends
file_downloadand you also send your ownfile_downloadfrom a tag, the count doubles. Turn off the toggle or remove your tag. - Expecting retroactive data. Toggling enhanced measurement on, or registering a parameter as a dimension, only affects data collected afterward.
- Inconsistent capitalization. Mixed case splits one action across several rows.
- Overusing custom names. Dynamic names hit the 500-name cap and make reports hard to read.
Exercise
Your site sends gtag('event', 'Video_Play', { title: 'Intro' }) and the property also has the enhanced measurement video toggle on. Which kinds of events are involved, and what two problems can you predict in the Events report?
Show answer
Video_Play is a custom event (its name is not in Google's lists), and the enhanced measurement toggle produces video_start for embedded YouTube videos. The first problem is double measurement of the same action under two different names, Video_Play and video_start. The second is the capitalization: Video_Play is a different event from video_play, so any other implementation using lowercase would appear as a separate row. The title parameter also needs to be registered as a custom dimension before you can break the event down by it.
Exercise
A teammate wants one event per button, such as click_pricing_button and click_contact_button. What would you propose instead, and why?
Show answer
Send one custom event such as cta_click with a parameter like cta_name holding the button identifier, then register cta_name as a custom dimension. This keeps the number of distinct event names low, avoids the 500-name limit, and lets you compare buttons in a single report.