Default reports in Google Analytics don't automatically collect specific data from a site. Custom dimensions allow you to view additional data points or pieces of information alongside GA’s default hits.
This article describes how to create custom dimensions and the process of it.
Custom dimensions are essentially custom secondary dimensions that are configured through your GA settings. There’s a section within secondary dimensions solely dedicated to custom dimensions, once enabled. Here’s an example of a standard secondary dimension pulled into a GA report:
As commented custom dimensions allow to have extra information of your site available on GA. In this specific case, we're interested in collect data from WCM, for example, content author, user id or user role. This information is available on a page of the site but we also can find this information in the page source, in a dataLayer, URL or GTM variable into GTM variable into your GA.
Custom dimensions are made up of the following elements:
- Index: the identifying number for your values
- Values: the specified data that’s sent
- Scopes: the type of value that’s collected
- Variables: what collects your value in GTM
How to set up a Custom Dimension through Google Tag Manager
- Log in to your Google Analytics account
Navigate to Admin > Property Settings > Custom dimensions in your Google Analytics account
Add a custom dimension. Define dimension's name, specify scope type and make sure 'Active' is checked.
If you are not familiarized with scope definition, please click here to have more context of scope custom dimensions.
Take note of the dimension number. GA will create a custom tracking code for those settings.
- Log in to your Google Tag Manager account
- Create your variable in GTM. The type of the variable created will vary depending on where the information is located.
- A part of the URL parameter
- a dataLayer variable
- A custom Js variable
- Default GTM variable
- Set the field name and value in your GA variable. Your Ga property must be tracked through a Universal Analytics in GTM to set up custom dimension with this method.
- Set the index and value under Custom Dimensions. Set the index to the number you noted from step 3. Then, set the same variable that is returning the value.
Validate in preview mode you are getting values for all custom dimensions created.
Use any of the tools described in this article.