This article is about Google Analytics 4 properties. If you're using a Universal Analytics property, refer to the Universal Analytics section of this help center.

[GA4] About event parameters

Parameters are additional pieces of metadata about your events

Parameters are additional pieces of metadata that add context to event data. Some parameters, such as page_title, are sent automatically. In addition to parameters that are sent automatically, you can send up to 25 custom parameters with each event.

The values assigned to parameters that are sent automatically as well as the values assigned to parameters in the Events reference populate dimensions and metrics in Analytics. For example, the value assigned to the coupon parameter in the following snippet populates the Coupon dimension.

gtag("event", "begin_checkout", {
  currency: "USD",
  value: 7.77,
  coupon: "SUMMER_FUN",
});

The values assigned to custom parameters don't populate dimensions and metrics automatically. To see custom parameters as dimensions and metrics, create custom dimensions and metrics.

Set parameter values for every event

By updating the config command in the global site tag, you can set parameter values for every event on a page. For example, to change the page title, add the page_title parameter to your config command.

gtag('config', 'MEASUREMENT_ID', {
  'page_title': 'Travel Destinations',
  'currency': 'USD'
});

If you configure multiple properties on a page, use the set command so that all measurement IDs inherit the properties. Place the set command above the config command so the values are passed with pageviews.

gtag('set', {
  'page_title': 'Travel Destinations',
  'currency': 'USD'
});
gtag('config', 'MEASUREMENT_ID_1');
gtag('config', 'MEASUREMENT_ID_2');
gtag('config', 'MEASUREMENT_ID_3');

Set user properties

User properties are attributes that describe segments of your user base, such as language preferences or geographic locations. Analytics automatically logs some user properties. You can send up to 25 additional user properties per project.

For example, the following sets the user property favorite_composer to "Mahler" for all events on the page:

gtag('set', 'user_properties', {
  favorite_composer: 'Mahler',
  favorite_instrument: 'double bass',
  season_ticketholder: 'true'
});

You can place the set command anywhere on your page.

Was this helpful?
How can we improve it?
Search
Clear search
Close search
Google apps
Main menu
Search Help Center
true
69256
false