Sub topic 1
How GA4 data is structured: events and parameters
Prerequisites
This chapter assumes that you can access a GA4 property with at least Viewer permissions. You should know what a website or app event is and be comfortable reading a table or pivot table. Basic familiarity with GA4 standard reports will help.
The event-based model
GA4 stores interaction data as events. An event is a recorded action, such as a page view, a product selection, a search, or a purchase. Each event has a name and may include additional details called event parameters.
This differs from a session-based model in which a visit is the main record. In GA4, a session and a user are calculated from collections of events. An exploration can therefore summarize the same events at different levels.
For example, a visitor might generate these events:
- page_view for opening a page
- scroll for reaching part of the page
- addtocart for adding a product
- purchase for completing an order
The event name identifies the action. Parameters describe the action. A purchase might include a currency, a value, and an item identifier.
Parameters provide context
A parameter is a key-value detail attached to an event. For example, the key page_location can have a page URL as its value. GA4 collects some parameters automatically, while recommended and custom events can add others.
Parameters are not automatically available as exploration dimensions. To use a custom parameter in reports and explorations, you usually create a custom dimension or custom metric in the property. The registration must match the parameter's meaning and scope.
A parameter can describe:
- The object involved, such as itemid or contentgroup.
- The action's context, such as page_location.
- A numeric result, such as value or quantity.
- A classification, such as method or search_term.
Avoid sending personally identifiable information, such as email addresses or names, in event parameters.
Events become dimensions and metrics
A dimension is an attribute used to group or describe data. Examples include event name, device category, landing page, and session default channel group.
A metric is a measurement. Examples include event count, sessions, engaged sessions, and total users. When you place event name in the rows of an exploration and event count in Values, GA4 groups events by name and counts them.
| Exploration field | Example | Question it answers |
|---|---|---|
| Dimension | Event name | Which actions occurred? |
| Dimension | Device category | On which device? |
| Metric | Event count | How many times? |
| Metric | Total users | How many users? |
The same event can contribute to metrics with different scopes. Event count counts occurrences. Total users counts distinct users who generated the selected data. Sessions counts visits containing relevant events. These numbers are not interchangeable.
Why the model matters in Explore
Before building a Free-form exploration, decide what each row represents. If rows contain event names, the table describes actions. If rows contain landing pages, it describes entry pages. Adding a session-scoped field to an event-focused question can change the interpretation or make fields incompatible.
Exercise
You want to compare the number of purchase actions with the number of users who made those purchases. Which dimension and metrics could you use?
Show answer
Use the purchase event as a filter or event-name dimension, then compare Event count with Total users. Event count measures purchase occurrences, while Total users measures distinct users who generated the selected purchase data.