Sub topic 5
Choosing a Scope: Event, User, or Item
Assume you understand GA4 events, have basic GA4 Admin access, and can send data with gtag.js or Google Tag Manager. The main decision is not the label you want in a report. It is how long the value should describe something.
A custom dimension is a registered text value that you can use in GA4 reports, Explorations, or audiences. Its scope defines what the value belongs to:
- Event-scoped: one occurrence of an action.
- User-scoped: a person or device across multiple events.
- Item-scoped: one product or content item inside an ecommerce event.
Event scope: describe what happened
Use event scope when the value can change from one event to the next. Examples include:
- The plan selected in a
select_planevent. - The position of a clicked button.
- The article category for a
view_articleevent. - The payment method used for one purchase.
gtag('event', 'select_plan', {
plan_tier: 'pro',
billing_cycle: 'annual'
});Register plan_tier and billing_cycle as event-scoped custom dimensions. GA4 then relates each value to the particular select_plan event that carried it.
For example, if a user first selects the Pro plan and later selects the Basic plan, event scope preserves both actions. A user-scoped dimension would not represent that sequence accurately.
User scope: describe who did it
Use user scope for a relatively stable characteristic of a user. Examples include:
- Account type, such as
subscriberortrial. - Preferred language.
- Loyalty tier.
- A consented customer segment.
gtag('set', 'user_properties', {
customer_type: 'subscriber'
});Register customer_type as a user-scoped custom dimension. GA4 attaches the property to later events from that user. This lets you compare events from subscribers and trial users.
User properties are not a history of every value a user has ever had. If a customer changes from trial to subscriber, later events can reflect the new value. Use event scope when the change itself must be analyzed.
Item scope: describe one product or item
Use item scope when the value belongs to a specific item in an ecommerce event. An event can contain multiple items, and each item can have a different value.
gtag('event', 'view_item', {
currency: 'USD',
value: 29.99,
items: [{
item_id: 'SKU_123',
item_name: 'Trail Shoe',
item_color: 'green'
}]
});Register item_color as an item-scoped custom dimension. This keeps the color attached to the Trail Shoe rather than to the entire view_item event. Item scope is useful for attributes such as color, size, brand group, or product condition.
Compare the scopes
| Scope | Belongs to | Example | Choose it when |
|---|---|---|---|
| Event | One event | `billing_cycle` | The value describes one action |
| User | A user across events | `customer_type` | The value describes the user |
| Item | One item in an event | `item_color` | The value describes a product or item |
flowchart TD
A[Choose what the value describes] --> B{One action?}
B -->|Yes| C[Event-scoped dimension]
B -->|No| D{A person or device?}
D -->|Yes| E[User-scoped dimension]
D -->|No| F{An item in an ecommerce event?}
F -->|Yes| G[Item-scoped dimension]
F -->|No| H[Redesign the data model]A practical decision rule
Ask, “If the same user performs this action again, can this value differ?”
- If yes, start with event scope.
- If the value describes the user's current state, use user scope.
- If several products in one event need different values, use item scope.
Avoid putting a user attribute on every event as an event parameter unless you need its value at each individual event. Duplicating it increases maintenance and can produce conflicting values.
Exercise
A purchase contains three products, each with a different color. Should color be event-scoped or item-scoped?
Show answer
Use an item-scoped custom dimension because each color belongs to one product within the purchase.