Sub topic 3
Registering Custom Dimensions So You Can Filter on Them
Assume you already collect GA4 events and understand event parameters and user properties. You also need Editor or Administrator access to the property. This chapter shows how to make custom values available as audience conditions.
Why registration is required
An event parameter is a value sent with an event. A user property is a value that describes a user. For example, plan_name can describe a selected subscription plan, while membership_tier can describe the user's account level.
GA4 collects these values when your implementation sends them. However, the audience builder cannot reliably use every custom value until you register its definition:
- Register an event parameter as an event-scoped custom dimension.
- Register a user property as a user-scoped custom dimension.
- Register an item parameter as an item-scoped custom dimension when you need product-level analysis.
Registration gives GA4 a name, scope, and description for the value. It does not change the event data already sent.
Send values with consistent names
The parameter name in your implementation must exactly match the name you register. Name spelling and capitalization matter.
gtag('event', 'select_plan', {
plan_name: 'pro',
billing_period: 'annual'
});
gtag('set', 'user_properties', {
membership_tier: 'premium'
});In this example, plan_name and billing_period are event parameters. They can vary from event to event. membership_tier is a user property, so it describes the user across events until you change or clear it.
Register the custom dimensions
In the GA4 property:
- Open Admin.
- Under Data display, select Custom definitions.
- Select Create custom dimension.
- Enter a clear dimension name, such as
Plan name. - Choose Event for an event parameter or User for a user property.
- Enter the exact parameter or property name, such as
plan_name. - Add a description and save the definition.
Use a name that explains the business meaning. The display name can contain spaces, but the parameter name must match the collected value exactly.
Use the definition in an audience
After registration and processing, the definition becomes available in audience conditions. For example, you can create a condition where:
Plan nameequalsproMembership tierequalspremium
The event-scoped condition checks events carrying plan_name. The user-scoped condition checks the user's current membership_tier. Do not choose an event scope for a value that is sent only as a user property.
Common errors
- Registering the display name instead of the collected parameter name.
- Choosing the wrong scope.
- Expecting registration to backfill old events.
- Using high-cardinality values, such as unique IDs, as audience attributes.
- Creating a definition after testing only one event and assuming all traffic includes it.
Allow time for GA4 to process the definition and incoming data. Test with a known value, then check whether the audience begins receiving users.
Exercise
You send membership_tier with gtag('set', 'user_properties', ...). Which custom dimension scope should you choose?
Show answer
Choose User scope because membership_tier is a user property rather than an event parameter.