Sub topic 1
Everything is an event: GA4's data model
Prerequisites
You need a GA4 property with a web data stream that already collects data. You should know how to use the left-hand navigation, and you should understand what a page view and a session are.
Everything is an event
Google Analytics 4 (GA4) records every user action as an event. A page view, a scroll, a file download, and a purchase are all events. Each event has a name, such as page_view, and can carry parameters. A parameter is a key-value pair that adds detail, such as page_location or file_name. Every report reads from this same event stream.
Four kinds of events
| Kind | Who sets it up | Examples |
|---|---|---|
| Automatically collected | Google, with no setup | `session_start`, `first_visit`, `user_engagement` |
| Enhanced measurement | You, by switching it on in the data stream | `scroll`, `click` (outbound), `view_search_results`, `file_download` |
| Recommended | You, using Google's suggested names | `login`, `sign_up`, `purchase` |
| Custom | You, by inventing a name | `newsletter_signup` |
Recommended names keep reports consistent across properties. Custom names cover anything the other kinds miss.
A tour of the Engagement reports
The Engagement section of the left-hand navigation holds reports built on these events. The Pages and screens report shows views and engagement by page. The Events report lists every event name your property has received. The Landing pages report shows where sessions begin.
Reading the Events report
Open Reports, then Engagement, then Events. Each row shows an event name, its event count, and the number of users who triggered it. Select a name to see its parameters.
To send a custom event from a page that already loads gtag.js, use this code:
gtag('event', 'newsletter_signup', {
placement: 'footer'
});The event appears in the Events report under newsletter_signup. The placement parameter is recorded with each occurrence, but you must register it as a custom dimension before you can report on it.
Exercise
Is file_download an automatically collected event, an enhanced measurement event, or a custom event, and why?
Show answer
It is an enhanced measurement event. Google collects it once you switch on the setting in the data stream, so you do not write code for it.