Web Analytics with Google Analytics 4The GA4 data model · Lesson 6 of 20

Custom definitions, scopes and core metrics

Article · 10 min · 8 min lecture

Video lecture

Custom definitions, scopes and core metrics

15 chapters · about 8 min · full transcript

Coming soon

Chapter 1 of 15

Custom definitions and metrics

  • Collection is not reporting
  • Scopes: event, user, item
  • Cardinality and (other)
  • Core metric definitions
  • Auditing via API

The narrated lecture is in production

Every chapter is scripted and ready. Browse the chapters and read the full transcript now — the video will appear here when it’s published.

Chapters

Collection is not reporting

GA4 will happily accept a custom parameter like plan_tier or author, but most standard reports and explorations will not show it until you register a custom definition. Registration is done in the property's admin area and is not retroactive — data collected before registration will not appear under that dimension. Register on day one of implementation.

Scopes

Every custom definition has a scope that determines what it describes:

ScopeDescribesExampleTypical source
EventA single event occurrenceform_id, video_title, authorEvent parameter
UserThe user across eventsmembership_tier, customer_typeUser property
ItemA product in an e-commerce items arrayitem_color, item_size_bandItem parameter

Choosing the wrong scope is a classic error. If you register customer_type as event-scoped, it will only appear on events where it was explicitly sent, not across the user's entire behavior.

GA4 limits how many custom dimensions and metrics a property can register (with higher limits in the paid GA4 360 tier). Treat slots as a scarce resource: document each one in your tracking plan and retire unused ones deliberately.

Custom metrics and calculated metrics

A custom metric registers a numeric parameter (for example quote_amount or reading_time_seconds) so it can be summed or averaged. A calculated metric is a formula over existing metrics (for example revenue per engaged session). Use them when stakeholders repeatedly compute the same ratio by hand.

Cardinality and the "(other)" row

Cardinality is the number of unique values a dimension has. High-cardinality dimensions — full URLs with query strings, unique IDs, timestamps, free-text inputs — can cause GA4 to group less common values into a row labeled (other) in some reports. To reduce the risk:

  • Band continuous values (order_value_band: 50_100) instead of sending raw numbers as dimensions.
  • Strip unneeded query parameters from page locations.
  • Keep IDs out of general dimensions unless you need them for joins (and then prefer BigQuery export).
  • Use explorations or the BigQuery export for granular analysis.

Core metric definitions you must be able to explain

MetricPlain-language definition
Users / Active usersDistinct users who had an engaged session or certain first-time events in the period; GA4's default "users" in most reports refers to active users
New usersUsers interacting for the first time (first_visit / first_open)
SessionsPeriods of activity, started by session_start
Engaged sessionsSessions over 10 seconds (adjustable), with a key event, or with 2+ page/screen views
Engagement rateEngaged sessions / sessions
Average engagement timeTime the page was in focus in the foreground, averaged
Key eventsCount of events marked as key events
Session key event rateShare of sessions with at least one key event
Total revenuePurchase, subscription and ad revenue minus refunds (depending on setup)

Because GA4 counts active users by default, numbers can differ from tools that count every visitor. When presenting, always name the metric precisely ("active users", not just "users").

Worked example: publisher author analysis

A news site in Riyadh wants to know which authors drive subscriptions. The implementation:

  1. Add author and content_group as event parameters on page_view.
  2. Register both as event-scoped custom dimensions.
  3. Register subscriber_status (free, trial, paid) as a user-scoped dimension from a user property.
  4. In a free-form exploration, rows = author, columns = subscriber_status, values = engaged sessions and subscribe key events.

Now the editor can see which authors attract engaged readers who later subscribe — a much better editorial KPI than raw page views.

Governance for custom definitions

Maintain a definitions register alongside your tracking plan:

| Name            | Scope | Parameter        | Created    | Owner    | Used in                 |
|-----------------|-------|------------------|------------|----------|-------------------------|
| Author          | Event | author           | 2026-01-12 | Content  | Editorial dashboard     |
| Subscriber tier | User  | subscriber_status| 2026-01-12 | Growth   | Retention exploration   |
| Size band       | Item  | item_size_band   | 2026-02-03 | E-comm   | Merchandising report    |

Hands-on: register definitions and check them programmatically

Register custom dimensions in Admin > Data display > Custom definitions (menu names change occasionally). For audits across many properties, the Google Analytics Data API can list what is registered and run a quick report to confirm values are arriving:

# pip install google-analytics-data
from google.analytics.data_v1beta import BetaAnalyticsDataClient
from google.analytics.data_v1beta.types import (DateRange, Dimension, Metric,
                                                RunReportRequest, GetMetadataRequest)

PROPERTY = "properties/123456789"
client = BetaAnalyticsDataClient()            # uses Application Default Credentials

meta = client.get_metadata(GetMetadataRequest(name=f"{PROPERTY}/metadata"))
custom = [d.api_name for d in meta.dimensions if d.api_name.startswith("customEvent:")
          or d.api_name.startswith("customUser:")]
print("registered:", custom)

report = client.run_report(RunReportRequest(
    property=PROPERTY,
    dimensions=[Dimension(name="customEvent:author")],
    metrics=[Metric(name="engagedSessions")],
    date_ranges=[DateRange(start_date="7daysAgo", end_date="yesterday")],
    limit=10,
))
for row in report.rows:
    print(row.dimension_values[0].value, row.metric_values[0].value)

If the report shows mostly (not set), the parameter is registered but not being sent on the events you expected.

Second worked example: an online academy's course dimensions

An education platform sends course_slug, lesson_type (article or video) and content_language as event parameters on page_view and a custom lesson_complete event, and learner_plan (free, pro) as a user property. It registers the three event-scoped dimensions and one user-scoped dimension on launch day. Within a month, one exploration shows which courses have high completion but low upgrade rates, which becomes the input to the next pricing experiment.

Common mistakes

  • Registering definitions weeks after launch, losing early data.
  • Wrong scope, especially user attributes registered as event scope.
  • Using exact monetary amounts or IDs as dimensions and then wondering why reports show "(other)".
  • Comparing "users" in GA4 with "visitors" in another tool without explaining the definitions.

Key takeaways

  • Custom parameters must be registered as custom definitions to be reported, and registration is not retroactive.
  • Choose the right scope: event, user or item.
  • Control cardinality by banding values and avoiding IDs or free text in dimensions.
  • Always name metrics precisely — GA4's default users are active users.

Check your understanding

Quick questions to lock in the lesson. They don’t count towards your certificate.

  1. A customer_type attribute should apply to all of a user's behavior. How should it be registered?
  2. Reports show a large '(other)' row. What is the most likely cause?
  3. You register a custom dimension today for a parameter collected for three months. What will you see for past data?

Put it into practice

Create a definitions register for a site you know with at least four custom dimensions across event, user and item scopes, justifying each scope.

Enrol for free to save your progress

Reading is always free. Enrol to keep your place, take the final assessment and earn a verifiable certificate.