This guide shows you how to set up parameters for [recommended events](https://support.google.com/analytics/answer/9267735) and
[custom events](https://support.google.com/analytics/answer/12229021) on your website so you can collect more information from your
events. For information about how to add item-scoped parameters, see
[Measure ecommerce](https://developers.google.com/analytics/devguides/collection/ga4/ecommerce#implementation).

## Audience

You want to collect more information about your users' activity through the
events you've already set up.

You use either the Google tag (gtag.js) or Google Tag Manager on your website.
If you want to set up event parameters for a mobile app, see [Log events](https://firebase.google.com/docs/analytics/events).

<br />


<button value="gtm" default="">Tag Manager</button> <button value="gtag">gtag.js</button>

## Before you begin

This guide assumes that you've done the following:

- [Create a Google Analytics account and property](https://support.google.com/analytics/answer/9304153#account)
- [Create a web data stream for your website](https://support.google.com/analytics/answer/9304153#stream&zippy=%2Cweb)
- [Place the Tag Manager snippets on your website](https://developers.google.com/tag-platform/devguides/add-tag)
- [Connect the Google Analytics destination in your Google Tag Manager container](https://support.google.com/tagmanager/answer/9442095#recommended)

It also assumes that you have the following:

- Access to the Tag Manager container for the website
- The Editor (or above) role to the Google Analytics account

You should also read [Set up events](https://developers.google.com/analytics/devguides/collection/ga4/events) before reading this guide.

## Understand event parameters

Parameters provide additional information about the ways users interact with
your website. For example, when someone views a product you sell, you can
include parameters that describe the product they viewed, such as the name,
category, and price.

The automatically collected and enhanced measurement events include parameters
by default. Google also provides a set of required and optional parameters to
include with each recommended event. Additionally, you can add more event
parameters when you need them.

## Set up event parameters

The following steps show you how to add parameters to a custom event called
"Signup newsletter" so that the event includes the label of the button that the
user clicked. These steps assume that you've followed the steps in
[Set up events](https://developers.google.com/analytics/devguides/collection/ga4/events).

### Step 1: Create variables for the event parameters

1. In [Google Tag Manager](https://tagmanager.google.com/), go to ![Tags icon](https://fonts.gstatic.com/s/i/short-term/release/googlesymbols/label/fill1/24px.svg) **Tags**.
2. Open your Google Analytics: GA4 Event tag.
3. In **Tag Configuration** , expand **Event Parameters**.
4. In **Parameter Name** , enter a name for the parameter, such as `button_label`.
5. In **Value** , click ![Icon for adding a variable](https://developers.google.com/analytics/devguides/collection/ga4/img/icon-add-variable.png) next to the field to add a variable.
6. Choose a variable for the value of the event parameter. For example, choose
   **Click Text** for the text of the button clicked.

   If you use a [data layer](https://developers.google.com/tag-platform/tag-manager/web/datalayer) object, you can select **+** in the top right and
   choose **Data Layer Variable**.
7. Save your changes and publish your container.

Your configuration might look something like this:

![The tag configuration in Step 1](https://developers.google.com/analytics/devguides/collection/ga4/img/event-param-config.png)

### Step 2: Preview your changes

Before you publish your new event in Tag Manager, click **Preview** to see the
data that's recorded when you click the "Sign up for the newsletter" button.

You can use preview mode to test changes to your container before you publish
those changes to your website. [Learn more about preview mode](https://support.google.com/tagmanager/answer/6107056).
> **Important: Register custom parameters**
>
> Sending custom parameters in your code is only the first step. For Google
> Analytics to display and allow you to analyze data from any **custom
> parameters** in standard reports and explorations, you **must register them as
> custom dimensions or metrics** within the Google Analytics interface.
> Without this registration, the parameter data is collected but isn't
> available for reporting.
>
> [Learn more about custom dimensions and metrics](https://support.google.com/analytics/answer/14240153).

## See your events in Analytics

When you are ready to publish your changes, click **Submit**.

![](https://developers.google.com/analytics/devguides/collection/ga4/img/submit-tag-manager.png)

You can verify that your events and parameters are being sent correctly by using
the [*Realtime*](https://support.google.com/analytics/answer/9271392) and [*DebugView*](https://support.google.com/analytics/answer/7201382) reports. These reports show data as it
arrives. Note that the *DebugView* report requires some
[additional configuration](https://support.google.com/analytics/answer/7201382#enable) before you can use it.

However, to see and analyze the values of any **custom parameters** you send
within the broader Google Analytics reporting interface (such as in Explorations
or standard reports), you **must first register them as custom dimensions or
metrics**. After you register a custom dimension or metric, it can take up to 48
hours for the data to become available in your reports.

[Learn about custom dimensions and metrics](https://support.google.com/analytics/answer/14240153).

### Verify in DebugView

When using the [*DebugView*](https://support.google.com/analytics/answer/7201382) report, parameters defined with `gtag('set')` are
applied to all subsequent `gtag('event')` invocations on the page. To verify,
make sure the `gtag('set')` command is executed **before** the event fires.
Then, select an event in DebugView and examine its **Parameters** tab to see the
merged list of parameters, including those globally set.

Some parameters automatically populate prebuilt [dimensions and metrics](https://support.google.com/analytics/answer/9143382) in
Google Analytics. For example, the parameters on the automatically collected
and enhanced measurement events, as well as the required and optional parameters
you send with the recommended events, populate prebuilt dimensions and metrics.

Other parameters require you to create [custom dimensions and metrics](https://support.google.com/analytics/answer/10075209) to
see the parameter values in Google Analytics.

> [!IMPORTANT]
> **Important:** To analyze custom parameters in Google Analytics reports, you must first register them as custom dimensions or metrics. This step is required regardless of whether the parameters are sent using `gtag('event')`, `gtag('config')`, or `gtag('set')`.

## Next steps

[Create custom dimensions and metrics](https://support.google.com/analytics/answer/10075209) for your custom event parameters.