Sub topic 3
Event parameters: adding context to an event
An event name says what happened. Event parameters say the details: which page, which product, how much money, which button. This chapter covers how parameters work, where they come from, their limits, and why a parameter you send may not appear in reports. It assumes you can read JavaScript objects and function calls, know the GA4 interface, and have a property with a web data stream.
What a parameter is
An event parameter is a key-value pair attached to one event hit. The key is a name such as currency. The value is a string or a number. GA4 stores parameters with the event they were sent on. They are not shared between events unless you send them again or set them globally.
gtag('event', 'newsletter_signup_click', {
placement: 'footer',
plan_type: 'free'
});This hit has one event name, newsletter_signup_click, and two parameters, placement and plan_type. If you send placement on a different event, GA4 treats it as a separate parameter instance on that event.
Three sources of parameters
Every event you see in GA4 carries parameters from three places.
| Source | Example | Who sets it |
|---|---|---|
| Collected automatically | `page_location`, `page_referrer`, `page_title`, `language`, `screen_resolution`, `ga_session_id`, `engagement_time_msec` | GA4 itself, on every event |
| Defined by Google for an event | `transaction_id`, `value`, `currency`, `items` on `purchase`; `method` on `login` | You send them, following the recommended event's documentation |
| Defined by you | `placement`, `plan_type` | You invent them for a custom event or add them to another event |
The first group means you rarely need to send the page URL yourself. The second group matters because GA4's built-in reports and integrations read recommended parameters by name. The third group is where most mistakes happen.
Recommended parameters carry meaning
Recommended events have parameters that GA4 understands. Here is the purchase event again:
gtag('event', 'purchase', {
transaction_id: 'T_12345',
value: 59.98,
currency: 'USD',
items: [
{
item_id: 'SKU_123',
item_name: 'Trail Shoes',
price: 29.99,
quantity: 2
}
]
});Several rules apply to these parameters:
valuemust be a number, not a string such as"59.98". A string can break revenue reporting.currencymust be a three-letter ISO 4217 code such asUSD. If you sendvaluewithoutcurrency, revenue for that event is not reported correctly.transaction_idshould be unique per order. GA4 uses it to avoid counting the same purchase twice.itemsis an array of objects. Each object has its own item-scoped parameters, such asitem_idandprice.
Sending a recommended event under the right name but with misspelled parameters is a common failure. The event appears in reports, but the dependent reports stay empty.
How a parameter travels to a report
A parameter has a longer journey than most people expect. It does not reach standard reports just because you sent it.
The key point is that unregistered parameters are still collected and stored. They appear in DebugView and in the BigQuery export, but you cannot select them as a dimension or metric in reports. Registration is covered in a later chapter. Here, just remember to plan for it when you design a parameter.
Some parameters work in reports without registration, because GA4 already has a built-in dimension for them. Examples include page_location, page_title, and the items fields in ecommerce reports.
Limits you will hit
GA4 enforces limits on parameters. For a standard property, these are the ones to know:
| Limit | Value |
|---|---|
| Parameters per event | 25 |
| Parameter name length | 40 characters |
| Parameter value length | 100 characters |
| Event-scoped custom dimensions per property | 50 |
| Event-scoped custom metrics per property | 50 |
GA4 360 properties have higher limits, for example longer parameter values. Check the current documentation for your property type, because Google adjusts these numbers.
Parameter names follow the same rules as event names. They can contain letters, numbers, and underscores, and must start with a letter. They must not start with the reserved prefixes google_, ga_, or firebase_. Use snake_case consistently, because Plan_Type and plan_type are two different parameters. Names are case-sensitive.
When a value exceeds the length limit, GA4 truncates or drops it, so long text such as a search query or a full URL with query strings can lose its tail. Shorten values before sending them.
Choosing parameter values well
Think about how you will use the value before you send it.
- Use a bounded set of values for dimensions.
plan_typewith valuesfree,pro, andteamis easy to report on. A parameter holding a unique timestamp or user-typed text has thousands of distinct values. When a custom dimension has too many distinct values, GA4 groups the overflow into an(other)row. - Use numbers for things you will add up or average. Send
video_seconds_watched: 42as a number if you want to register it as a custom metric. A numeric value in a string field cannot be summed. - Keep one meaning per name. If
placementmeans page area on one event and ad slot on another, the dimension mixes both. Either use distinct names or accept the shared meaning and document it. - Reuse recommended names where they fit. If you want a method, send
method, notlogin_type. This keeps your data consistent with Google's documentation.
Setting parameters once for many events
If a parameter belongs on every event, you do not need to repeat it on each call. Use set to attach values to all later events on the page:
gtag('set', {
site_section: 'docs'
});
gtag('event', 'newsletter_signup_click', {
placement: 'footer'
});The second event now carries both site_section and placement. The value persists only for the current page load. A new page load starts without it, so run the set call on every page, typically right after your configuration code.
A value passed directly in an event call overrides a value from set for that one event. Values set globally also count toward the 25-parameter limit on each event, so a long list of global parameters leaves less room for event-specific ones.
Parameters in a Google Tag Manager setup
With Google Tag Manager, you usually push values to the data layer, and a GA4 event tag reads them:
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'tutorial_complete',
tutorial_id: 'ga4-events-101'
});The event key triggers a Custom Event trigger. The tutorial_id value reaches GA4 only if the tag is configured to send it. In the GA4 event tag, add an event parameter named tutorial_id and set its value to a Data Layer Variable that reads tutorial_id. Pushing a value to the data layer does not send it to GA4 by itself. This missing mapping step is one of the most common reasons a parameter shows up in the data layer but not in DebugView.
Common errors
- Parameter appears in DebugView but not in reports. It was never registered as a custom dimension or metric. Registration also is not retroactive. Data collected before registration does not fill in.
- Revenue is missing.
valuewas sent as a string, orcurrencywas absent. - Two near-identical parameters. Inconsistent casing or naming, such as
planTypeandplan_type, split the data. - Parameter silently dropped. The name started with a reserved prefix, the name or value was too long, or the event exceeded 25 parameters.
- High-cardinality overflow. A parameter with many unique values collapsed into
(other)in reports.
Exercise
A developer sends gtag('event', 'newslettersignupclick', { placement: 'footer', plan_type: 'free' }). Both parameters appear in DebugView, but an analyst cannot find "placement" as a dimension in a report. What is missing, and will the report include events sent last week once the problem is fixed?
Show answer
The parameter must be registered as an event-scoped custom dimension in the property's custom definitions. Registration is not retroactive, so the dimension fills in only for events collected after registration. Last week's events will not show placement values in reports, although the raw values may still exist in the BigQuery export.