Google Analytics has a ton of data in it which is overwhelming for many people. Their built-in dimensions and metrics have enough information to satisfy the reporting needs of most Google Analytics users. In analytics, a dimension is an attribute, or way to describe visitors, and is displayed as a row in Google Analytics data. A metric is a number and is displayed as a column in reports. However, advanced users who need more than what is already provided can define their own variables for data when the built-in dimensions and metrics are not enough.
Some use cases for this customization including reporting website traffic based on the author of a post or its category. Another use case is if you have a website that sells services and products. You can make assumptions about whether someone is a potential service or product buyer based on which sections of the site they visit. However, you can ask them to self-identify as someone looking for services versus products by adding a drop-down box and letting visitors select why they are on the site today. You can then direct the content they see based on how they identify and set a custom dimension for “products” or “services” which is determined by their selection. To learn more about possible metrics and dimensions, you can view Google’s reference guide.
Before setting up custom dimensions or custom metrics, best practices are to lay out what you want in your final report. This can also help with determining if what you need is already built into analytics. Laying out what you need can be as simple as drawing out a simple table on a piece of paper or using an Excel spreadsheet to map out what the final report should look like. Keep in mind that Universal Analytics allows for up to a maximum of 20 custom dimensions and 20 custom metrics, but you may want to start small.
To get started, go to the Admin section of your Google Analytics account and choose “Custom Dimensions”. You will need Edit permissions in order to implement these custom dimensions and metrics. Enter the name for your dimension and choose an option for the scope. The hit-level scope is recorded every time a particular dimension of the site is hit. A hit-level scope could be something like recording a pageview for a post by a specific author or a specific post category.
The session level is for the entire session. So if there are multiple hits with different values, a value is recorded for all hits. An example of when session level is useful is when visitors behave differently when they are guests to the site versus logged in as registered users.
The user level scope is about a specific user and applies to all the hits for the current session and future session for this one user. Use this when you want to define your audience and remember a specific audience type whenever they return to the site.
The same steps above for custom dimensions are applied for custom metrics. The formatting types for custom metrics can be currency, time, or integer.
Once custom metrics and dimensions are created, you’ll see the code in your analytics to use on your site. This is the piece you will need to send to your tech team if you do not have the skills to implement it yourself. They’ll write a script to make the code work on your site by sending dimensions and metrics data with other data such as pageviews. You cannot send custom dimensions and metrics on their own. If you are interested in details about what this looks like, refer to the Field Reference guide provided by Google. Please note that custom dimensions and metrics cannot be deleted (similar to goals), but they can be made inactive by unchecking the “Active” box.
When you want to view the results, you can do so in your standard reporting tab as a secondary dimension for all existing data or in an advanced segment. To use them as a primary dimension instead, a custom report will need to be setup.
Keep in mind – these were referred to as custom variables in the classic version of Google Analytics and are now custom dimensions and metrics in Universal Analytics. An earlier post explains how to check which version you are on and what is available with Universal Analytics versus the previous version, which was Classic Analytics. You will want to confirm your version before you start planning a strategy for customization and of course, first ask the question if it’s something you need to do or if the built-in numbers and attributes are enough to answer your business questions.