Sub topic 1
The GA4 data model audiences are built on
GA4 audiences are built from the data that your property collects. Before creating an audience, understand the three main data elements: events, event parameters, and user properties.
Prerequisites
You should have a GA4 property with data collection working. You should also understand basic GA4 events, event parameters, and user properties. This chapter assumes you have Editor or Administrator access to the property and know the basic purpose of remarketing.
Events describe what happened
An event is a record of an interaction. Examples include page_view, sign_up, purchase, and add_to_cart. Each event has a name that identifies the interaction.
For example, an online store might send this event when a customer adds a product to a cart:
gtag('event', 'add_to_cart', {
currency: 'USD',
value: 29.99,
items: [
{
item_id: 'SKU_123',
item_name: 'Trail Shoes',
price: 29.99,
quantity: 1
}
]
});An audience condition can use the event name. For example, you can include users who triggered add_to_cart and exclude users who triggered purchase.
Parameters add context to an event
An event parameter is a key-value pair that gives an event more detail. In the example, currency, value, and items are parameters of the add_to_cart event.
Parameters let you create more specific conditions:
add_to_cartevents wherevalueis greater than 100purchaseevents wherecurrencyequalsUSDselect_planevents whereplan_nameequalspro
GA4 may collect some recommended parameters automatically when you use supported events. For parameters that you define yourself, register a custom dimension before relying on the parameter in audience conditions. Registration makes the parameter available for analysis and configuration in the GA4 interface. The data collection code and the custom definition must use the same parameter name.
User properties describe the user
A user property is an attribute associated with a user rather than one individual event. Examples include membership_tier, preferred_language, and account_type.
gtag('set', 'user_properties', {
membership_tier: 'premium'
});A user property can support an audience such as users whose membership_tier is premium. Register a user-scoped custom dimension for a custom user property before using it in audience conditions.
How the pieces connect
An audience is a changing group of users who currently meet defined conditions. GA4 evaluates incoming data against those conditions and updates membership over time. The audience does not store a separate copy of every event. It uses event and user data to decide whether each user belongs.
| Data element | Describes | Example audience use |
|---|---|---|
| Event | An interaction that happened | Users who triggered `add_to_cart` |
| Event parameter | Details about an interaction | Users who added an item worth more than 100 USD |
| User property | An attribute of a user | Users with `membership_tier` equal to `premium` |
Exercise
Which data element should you use to identify users who selected the annual billing option in a custom select_plan event?
Show answer
Use the event name together with an event parameter condition, such as select_plan where billing_period equals annual.