Google Analytics 4

GA4 Custom Parameters And User Properities

June 22, 2021

What Is An Event Parameter in Google Analytics?

Event parameters are the additional information on an event that you would like to pass on to GA4. If you are familar with events in Universal Analytics, parameters are similar to the event action or event label.

In Universal Analytics, you are allowed event label and event action to send additional event information (i.e click text, page url, etc). In Google Analytics 4, you can send up to 25 parameters with an event.

Use-Case: If you utilize authors on your articles, you can add the author name as an event parameter when someone clicks on an article. This can help you identify your top writers.

Google Analytics 4 automatically collects basic event information, like page URL. Any event parameters you want to send that are not automatically sent will need to be set-up as a custom parameter.

Automatically Collected Parameters In GA4

Automatically collected event parameters help cut down on the number of additional information you need to pass with an event. In Universal Analytics, you would need to add the page URL to the event action or label to see where the event occured.

Google sends the following event paramaters for each event to GA4:
  • Language: What language the user’s browser is in.
  • Page_Location: The page on which the event occurred.
  • Page_Referrer: The URL of the previous page the user visited. This includes URLs you don't own, like LinkedIn.
  • Page_title: The title of the page on which the event occurred.
  • Screen_resolution: The resolution dimensions of the user’s screen.

Custom Event Parameters

Custom event parameters can provide a lot more information about the actions users are taking on your site.

Use-Case: If you have multiple CTA buttons, you can pass on the text of each CTA button with a button click event. This will help show you which CTA buttons are getting the most clicks on your site.

Let's walk through how you would set this custom parameter up in GA4 has multiple Call-To-Action (CTA) buttons, like Call Now and Make A Reservation. In this example, I want to know how many times a CTA button was clicked AND what the button said.

Setting up an event for the button click will tell me how many times all CTA buttons were clicked.
Adding a custom parameter that sends the click text, will tell me how mant times each specific CTA button was clicked.

Creating A Custom Parameter

The event name is labeled as "cta_button_click".
The event parameter is labeled as "button_click_text" to highlight what CTA was clicked. You need to tie each event parameter to a variable.
In this case, the variable "click text" is used to pull in the text on the CTA button clicked (i.e Call Now and Make A Reservation).

You can utilize all of the Google Tag Manager's built-in variables like click text, click ID or Form ID.

For most use cases, the built-in variables should suffice. If you need a more advanced variable, like pulling in from a data layer, you will need to create your own custom variable. (More on custom variables)

You Need To Register Custom Parameters As Custom Dimensions In The GA4 Interface

Now that you have set-up a custom parameter you must register custom parameters as custom dimensions if you want to see them in your GA4 Reports.

Custom parameters will appear in the real-time reports, but will NOT show up in things like:
  • Event reporting charts and tables
  • All Explore reports.
Keep in mind that you can only have 100 custom dimensions or metrics. If you are utilizing GA4 360, your limit is 200 custom dimensions or metrics.

In Univeral Analytics, you could only have 20 custom dimensions and 20 custom metrics. You also could not archive or delete custom dimensions. Thankfully Google has changed the limitations on custom dimensions and metrics!

How To Set-Up Custom Parameters As Custom Dimensions Or Metrics In GA4

Custom dimensions are parameters that are text-based, like the text on a button. Custom metrics are numerical, like the cost of a subscription plan.

Regardless of whether you have a custom dimension or metrics, the steps are the same:

Step 1: Navigate To Configure And Click “Custom Definitions”

The page defaults to custom dimensions. If you need to set-up a custom metric, be sure select the "custom metric" tab before configuring.

  1. On the furthest left hand menu, click on the “Configure” bullet list icon.
  2. Navigate to “Custom definitions” on the inner left hand menu.
  3. Click on the blue “Create custom dimensions” button.

Step 2. Create A New Custom Dimension Or Metric

  1. First, name your new custom parameter. I recommend using the same name you use in Google Tag Manager.
  2. The scope for custom parameters should be event. The user scope is used for custom user properties.
  3. Create a unique description describing the custom parameter. In this case, it is the text on the CTA button.
  4. Finally, select your custom parameter name. If you don't see it in the drop-down, that's ok. Type it in exactly as you have in Google Tag Manager.
  5. Hit save. It may take up to 24 hours to start seeing data.

How To Use Event Parameters

After you have set-up your parameters as custom dimensions or metrics, you can use the parameters in the following ways:
  • Dive deeper in the events data table (shown below).
  • Create comparisons (the new term for Universal Analytics "segment") to view reports based off of specific site activity.
  • Add to GA4 Explore reports.
  • Add to Google Data Studio reports.

How To Find Your Custom Event Parameters

All custom and automatic event parameters can be found under the Custom (Event-scoped) field.
The most common place event parameters are used is on the Events table on the Events report tab.

To find your event parameters, follow the steps:
  1. In the events table, next to the Event Name, click the blue "+".
  2. Under Custom (Event-Scoped), you will see all of your custom parameters and the automatically collected parameters.

What Is A User Property In GA4?

User properties are attributes that define segments of your visitors. Assigning user properties allows you to group your users by their behaviors, preferences, or other attributes.

Examples of user properties are job titles identified in your user's profile or membership level.

In Universal Analytics, the terminology for user properties are named custom dimensions with a user scope. GA4 has re-labeled it as "Custom (User-Scope)". You can have up to 25 unique user properties.

Similar to event parameters, GA4 automatically collects basic user properties and allows you to set-up custom attributes.

Automatically Collected User Properties

Google Analytics 4 automatically collects user properties such as:
  • Age
  • Country and Language
  • Device Model and Category (i.e phone, tablet, desktop)
  • Gender
  • Interests
But to send custom user properities, like subscription plan status, you will need to set these up in Google Tag Manager.

Custom User Properties

Custom user properties are attributes that are set-up within your site's datalayer. Google Tag Manager can then pull-in the datalayer value.

You will need a developer to help set-up the initial user property component. The developer guide for user properties can be found here.

Common examples of user properties include things like client id, membership status, subscription tiers, or game level.

Creating A Custom User Property

After you have a datalayer event set-up, you can then add the attribute as a user property in GTM.

In this example, we want to be able to segment our users by their membership status.

Navigate To Your GA4 Tag Configuration

In Google Tag Manager, find your GA4 tag. Under the "User Properties" is where we will be adding the datalayer event variables.

Create A User Property Name And Associate It With A Variable

User properties need a unique name and to be associated with a variable. The set-up is similar to setting up custom event parameters.

The user property name is what will show up in your GA4 reports. You will then need to tie the property name to a variable.

In this example, the name "membership_status" is tied to the variable dlv-membership plan which dynamically sends to GA4 if the user is a member or not.

Note: If you need help setting up a datalayer event variable, you can checkout Analytics Mania's guide

Register Your User Property Within The GA4 Interface

In order for your user properties to appear in GA4 reports, you will need to register them within the GA4 interface. The steps are the same for user properties as they are for event parameters. The only difference is you will be setting up a custom dimension with a user scope.

Step 1: Navigate To Configure And Click “Custom Definitions”

The page defaults to custom dimensions. If you need to set-up a custom metric, be sure select the "custom metric" tab before configuring.

  1. On the furthest left hand menu, click on the “Configure” bullet list icon.
  2. Navigate to “Custom definitions” on the inner left hand menu.
  3. Click on the blue “Create custom dimensions” button.

Step 2: Create A New Custom Dimension With User Scope

  1. Name your custom user dimension.
  2. Ensure that you check User for the scope. This will tie the custom dimension to the user-level.
  3. Give the user dimension a description.
  4. Select the user property in the drop-down. If it doesn't show up, type it in exactly how it is shown in Google Tag Manager.
  5. Hit save at the top.

How To Use User Properties

After 24 hours, you will be able to see your user property in the GA4 reports as well as the GA4 explore reporting tools.

Utilizing user properities are the same as event parameters. Here are some of those ways:
  • Adding a comparison (i.e GA4's name for Universal Analytics segment) to compare all users v.s paid members.
  • Filter and add dimensions to reporting tables
  • Add to Explore reports. Segment overlap, cohort exploration, and user lifetime are some free built out templates in GA4 where user properties could be interesting.