Sub topic 4
Building Your First Audience with Conditions and Groups
Assume that you already collect GA4 events and understand event parameters and user properties. You also need Editor or Administrator access to the property. This chapter uses an audience of users who added an item to their cart but did not purchase.
Start with the audience goal
An audience is a group of users who meet conditions that you define. Write the business rule before opening the audience builder:
- Include users who triggered
add_to_cart. - Include only users whose
item_idisSKU_123. - Exclude users who triggered
purchase. - Keep users in the audience for 30 days.
The first condition identifies the event. The parameter filter narrows the event to a particular product. The exclusion prevents completed buyers from receiving a cart-reminder campaign.
Make the event data available
GA4 collects standard event names automatically when your implementation sends them. For example:
gtag('event', 'add_to_cart', {
currency: 'USD',
value: 29.99,
items: [{ item_id: 'SKU_123', item_name: 'Trail Shoes', price: 29.99, quantity: 1 }]
});The items array contains item details. To filter an audience by an item-level value such as item_id, confirm that your implementation and GA4 interface support that field for audience conditions. For custom parameters, first register the parameter as an event-scoped custom dimension under Admin > Data display > Custom definitions. Registration does not backfill older data.
Build conditions and groups
Open Audiences in the property and create a custom audience. Add the add_to_cart event as an inclusion condition. Then add the item filter, such as item_id equals SKU_123.
A condition group combines conditions with a logical rule. Conditions joined by AND must all be true. Separate groups commonly represent alternative paths joined by OR. Use the interface's displayed AND and OR labels as the source of truth, because the layout can change.
| Builder choice | Meaning | Example |
|---|---|---|
| Event condition | The user performed an event | `add_to_cart` |
| Parameter filter | The event or user matches a value | `item_id` equals `SKU_123` |
| AND | Every connected condition must match | Added an item AND has premium membership |
| OR or another group | Any alternative path can match | Added shoes OR added a jacket |
| Exclusion | Remove matching users | Exclude users who purchased |
The audience builder evaluates conditions against a user's collected activity. It does not create missing events or repair incorrectly named parameters.
Check the result
Use Preview or the estimated audience size before publishing. A zero estimate can mean that the event is new, the parameter is not registered, the value differs in capitalization, or the conditions are too narrow. After publishing, audience membership is based on future processing and may not appear immediately.
Exercise
You want users who added either SKU_123 or SKU_456, but you want to exclude anyone who purchased. How should you structure the audience?
Show answer
Create alternative inclusion conditions or groups for the two item IDs, join those alternatives with OR, and add a purchase exclusion that applies to the audience.