How to create a custom dimension for Affiliation in GA4

Updated on 2023-09-07

Creating Google Analytics 4 custom dimensions and metrics allows you to easily access and use your event properties and user properties.

For example, without creating a custom dimension for your custom affiliation event parameter, you won't be able to see the parameter values in reports or use them on explorations, segments and so on.

By adding ‘affiliation’ as a custom dimension, you’ll be able to analyze subscription data and answer specific questions to your business’s needs. 


Starting September 2023 Littledata applies automatically a set of custom dimensions, including Affiliation.

How to create a custom dimension for Affiliation in GA4

To create a custom dimension in Google Analytics 4 please follow the steps below:

  • Click on the Admin cog on the bottom left-hand corner in Google Analytics.

  • Click on Custom Definitions under Property.

  • Click on Create Custom Dimensions.

  • Add in Affiliation as the dimension name.

  • Add in Affiliation as the description.

  • Add in Affiliation as the event parameter.

  • Click on Save.

You will be able to use the custom dimension within 24 hours after its creation.

How to use the custom dimension for Affiliation

You can use this custom dimension and apply it to the built-in GA4 reports or create filters and segments on explorations.

Existing GA4 reports

If you are using a subscription app, you will be able to look at reports like Traffic Acquisition and exclude recurring or offline orders, by applying a filter based on the affiliation custom dimension:


By creating an exploration similar to the Sales performance one, you will be able to create a filter based on affiliation and include or exclude any type of orders coming into GA4.

Here is an example of a Sales performance exploration that has recurring orders excluded by a filter based on affiliation:

Additionally, you can also create segments for subscription analysis in GA4 by using the custom dimension for affiliation.