With Google Analytics 4 (and formerly, Universal Analytics), merchants have the option of employing a useful functionality called Custom Dimensions. Custom Dimensions help to enrich the data processed by Google Analytics and allow for the building of custom reports based on that enrichment. This functionality is extremely useful when the predefined metrics and dimensions that Google Analytics offers are simply not enough.
Our Google Analytics 4 and Google Analytics 4 PRO extensions allow you to make use of these Custom Dimensions straight out of the box, allowing you to start sending custom data over to Google Analytics within minutes!
The extension comes with a few types of Custom Dimensions available to you, so let's go over those a bit more in detail below:
Predefined Custom Dimensions
The extension features a set of scope-based Custom Dimensions that are available and enabled right out of the box, which already populate the dataLayer with the required information. These are as follow:
User Scoped Custom Dimensions
- Customer ID - Magento's internal ID for the current user
- Customer Group - The Customer Group the current user is part of
Hit Scoped Custom Dimensions
- Page Type - The type of the page the user is currently on
- Page Name - The name of the page the user is currently on
Product Scoped Custom Dimensions
- Stock Status (in stock/out of stock) - The product's stock status
- Reviews Count - The number of reviews the product currently has
- Reviews Score - The aggregate score of the product's reviews
- Sale Product - Whether or not the product is on sale
Custom Attributes as Custom Dimensions
While the Predefined Custom Dimensions listed above can be used to enhance the dataset your business is feeding into Google Analytics, sometimes, you need to be able to send even more, which is why the Google Analytics 4 module allows you to choose up to 5 of your Custom Attributes (usually attributed to Products) and send those over to Google Analytics as Custom Dimensions.
Note: The attributes you use need to have Used in Product Listing set to Yes in order to be displayed here.
- Set the Track Custom Attribute X option to Yes
- Choose a name (this is the parameter name that will show up in the dataLayer, which will also be used in Google Analytics when setting up the dimension. Don't use special characters or capital letters here. Underscores are accepted.
- Choose the Attribute you'd like to send data for, as the parameter value.
- Save the configuration, regenerate and reimport the container JSON into your Google Tag Manager account.
- Use Google Tag Manager's Preview Mode to ensure the data pulled by your Custom Attribute is populated in the dataLayer.
Setting up Custom Dimensions in Google Analytics
To start using the extra data you're sending over to Analytics, you'll need to instruct the platform to pick up on it, after which you should be able to use it to build custom reports and explorations. Follow the steps below to set up a Custom Dimension:
- Open up your Google Analytics Dashboard and click Admin.
- Choose Custom Definitions, which will bring up the Custom Dimension section.
- Click Create Custom Dimension.
- Choose a name for your Custom Dimension.
- Choose the Scope. Most of the time, this will be Item, however, it depends on your chosen Custom Dimension and attribute.
- Choose a Description for the Custom Dimension. This is optional.
- The final setting will depend on the Scope. It'll either be User Property, Event Parameter or Item Property. Important: The value you input here needs to match the dataLayer property name, which, if you're using a Custom Attribute as Custom Dimension, is the Attribute Name value you configured in the Magento Admin.
- Save the Custom Dimension and you're done.
Viewing the Custom Dimension Data in Google Analytics 4
Note: It'll take around 48 hours (or more) for the Google Analytics to start attributing the data you send it via the Custom Dimension. Until then, you'll always see the value (not set).
To view the data the Custom Dimension is now picking up, you can follow the process below:
- Using the menu on the left side of the Google Analytics 4 dashboard, navigate into Explore.
- Click Create New Exploration.
- On the left side of the page, you'll see the Dimensions tab. Click the + button, which will bring up the Dimensions drawer.
- Under the Custom tab, expand the Custom section, check your Custom Dimension and click Import.
- You'll now have the Custom Dimension you set up available as a Dimension for your report, which you can use as a Row or Column to combine with other metric Values and build your report how you see fit.
Comments
0 comments
Please sign in to leave a comment.