Sub topic 1
The GA4 data model audiences are built on
An audience is a saved set of rules that GA4 evaluates against the data it has collected. Every rule refers to something in the GA4 data model, so a mismatch between that model and your tagging is the usual reason an audience ends up empty. This chapter covers the pieces an audience can reference and how each one gets into the property.
Prerequisites
This chapter assumes you have:
- A GA4 property that is already collecting data, for example through gtag.js or Google Tag Manager.
- Editor or Administrator access to the property.
- A basic idea of what remarketing is: showing ads to people who already interacted with your site or app.
- Some comfort reading short JavaScript snippets.
Everything is an event
Universal Analytics organized data into sessions containing hits of different types, such as pageviews and events. GA4 has one record type, the event. A pageview is the page_view event. A session start is the session_start event. A purchase is the purchase event.
Each event record carries:
- An event name, such as
add_to_cart. - A timestamp.
- Event parameters, which are key-value pairs describing this one occurrence.
- Identifiers that tie it to a user (client ID, and user ID if you set one) and to a session.
- User properties, which describe the user rather than the occurrence.
- Automatically collected context, such as device category, country, and traffic source.
An audience condition is a test on one or more of these fields, for example "the event name is add_to_cart". Because the test is on events, the quality of your event tagging sets the ceiling for what your audiences can do.
Four kinds of event names
GA4 sorts events into four groups. The groups differ in how much guidance and automatic support they get.
| Kind | Examples | Who defines it |
|---|---|---|
| Automatically collected | `first_visit`, `session_start`, `user_engagement` | GA4 |
| Enhanced measurement | `scroll`, `click` (outbound), `file_download` | GA4, if enabled in the data stream |
| Recommended | `add_to_cart`, `purchase`, `login`, `sign_up` | You send them, using Google's names and parameters |
| Custom | `select_plan`, `video_quality_change` | You choose the name and parameters |
Prefer a recommended event when one fits. Its name and parameters are known to GA4, to Google Ads, and to predictive models, so features that depend on them work without extra setup. Use a custom event only when no recommended one matches.
Event parameters describe one occurrence
A parameter belongs to a single event. This snippet sends the standard add_to_cart event with its recommended parameters:
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 currency and value parameters describe this particular add-to-cart action. The next one may have a different value. An audience can use this event as a condition, for example "users who triggered add_to_cart". Combined with an exclusion for purchase, that gives you an audience of users who added to cart but did not buy.
Custom events carry their own parameters in the same way:
gtag('event', 'select_plan', {
plan_name: 'pro',
billing_period: 'annual'
});Here plan_name and billing_period exist only on this event. If you want a condition such as "plan_name equals pro", GA4 must know the parameter is a reportable dimension. That requires registration, covered below.
User properties describe the person
A user property is a key-value pair that GA4 attaches to the user and applies to events that follow it. It is meant for attributes that stay stable across many events, such as a subscription level.
gtag('set', 'user_properties', {
membership_tier: 'premium'
});Once set, membership_tier is sent with later events from that browser or app instance until you change it. Use a user property when the attribute describes who someone is. Use an event parameter when it describes what happened in one action. An audience of premium members suits a user property. An audience of people who chose the annual plan suits a parameter on select_plan.
A common mistake is putting a stable attribute in an event parameter on one event only. The attribute then exists only for that event, so a later audience condition cannot use it for the user's other activity.
Scopes: event, user, and item
Each field in GA4 has a scope, which says what the field describes. The scope controls where you can use the field.
| Scope | Describes | Typical example |
|---|---|---|
| Event | One event occurrence | `plan_name` on `select_plan` |
| User | The user across events | `membership_tier` |
| Item | A product in an `items` array | `item_name`, `item_category` |
Do not confuse these with the condition scopes inside the audience builder ("within the same event", "within the same session", "across all sessions"). Those are covered in a later chapter. The scopes here belong to the data. The builder scopes control how conditions are combined over time.
How data reaches an audience
The diagram shows the path from a tag firing to audience membership.
Registration is the step people skip. GA4 stores every parameter you send, up to its limits. It only exposes a parameter or user property in the interface once you register it as a custom dimension (text) or custom metric (number) in the property's Admin settings. This is not retroactive. Registration applies from that point forward, so history sent before you registered the field is not recovered for it. Register custom dimensions at the same time you ship the tagging.
Limits that shape your tagging
GA4 enforces quotas on names and values. The numbers below are for standard properties. Check Google's current documentation, because limits change, and GA4 360 properties get higher ones.
- Event names are limited to 40 characters.
- Parameter names are limited to 40 characters, and parameter values to 100 characters.
- User property values are limited to 36 characters.
- A property can register 50 event-scoped custom dimensions and 25 user-scoped custom dimensions.
- Each event can carry up to 25 parameters.
Hitting these limits shows up as silently truncated values or fields that are never registered. Plan your dimension names before you start tagging. In particular, do not put high-cardinality values such as timestamps or user email addresses in dimensions. They fill the quota and create no useful audience.
Common failure modes
- Audience stays empty. The event name has a typo or case difference, or the event never fires on the page you tested.
- Parameter filter is missing in the builder. The parameter was never registered as a custom dimension.
- Filter works only for new traffic. Registration is not retroactive, so only data collected after registration carries the dimension.
- User attribute is missing for some events. The user property was set after those events fired, or only on one page.
- Different values for the same attribute. Inconsistent casing, such as
Premiumagainstpremium, splits users into separate groups.
Exercise
A retailer wants an audience of premium members who added a product to their cart. They send membership_tier: 'premium' as an event parameter on add_to_cart only. Why will this be a weak design, and what should they change?
Show answer
The tier exists only on add_to_cart events, so GA4 cannot associate it with the user's other activity, and it must also be registered as an event-scoped custom dimension before the builder can filter on it. Membership tier describes the user, so it should be set as a user property with gtag('set', 'user_properties', { membership_tier: 'premium' }) and registered as a user-scoped custom dimension. The audience can then combine "membershiptier equals premium" with an `addto_cart` event condition.
Exercise
You added a plan_name parameter to select_plan events two weeks ago, but today it does not appear as a filter in the audience builder. What are two likely causes?
Show answer
First, the parameter was not registered as an event-scoped custom dimension in Admin, so the builder cannot offer it. Second, the registered name does not match the parameter name exactly, including case. Registering it fixes the situation only for data collected afterward.