Analytics expert, Manpreet Gill, follows up on from her last post, Part 1, where she covered a brief overview of Custom Dimensions and Metrics and what they involve...
Right! Let's take a quick recap:
Custom Dimensions and Metrics are just one of Universal Analytics many cool features, and replace what we know to be Custom Variables in classic analytics.
These allow for outside data to be brought into Google Analytics, giving us more flexibility and customization in reporting.
By creating a Custom Dimension/Metric in the Admin interface in Google Analytics, and adding the relevant snippet of code, we can be well on our way to using their awesomeness.
A key element to be aware of when setting up Custom Dimensions and Metrics is the scope that is assigned to them. Scope covers what your dimension or metric will be associated with and is allocated when they are initially created in the Google Analytics Admin Interface.
Let's dive straight in.
For each Custom Dimension, the scope can be one of the following:
Assign the dimension to an individual hit, Pageview, Event, Transaction, and Social Interaction.
Assign the dimension to every hit that occurs within a single session.
Assign to all hits for present and future sessions of the same user up until the value changes or the dimension is made inactive.
>Product (For Enhanced Ecommerce only)
Apply to a particular product.
When assigning a HIT Scope:
Each Hit that occurs within a session will be assigned its own individual value, hence, the value will not be overwritten when new hits occur.
For example, 3 buttons, when clicked upon, fire an event with the respective values Yes, No and Maybe:
Hit 1 on the first button has the value Yes
Hit 2 occurs elsewhere on the page but has no value
Hit 3 on the second button has the value No
Hit 4 on the third button has the value Maybe
Essentially, each hit that has occurred within the same session has its own exclusive value. Past hit values are not overridden by future hits.
When assigning a SESSION Scope:
Every hit that occurs within a session will be assigned the same value that any future hits may have (i.e.., the most recent hit value that has occurred).
Hit 1 has no value
Hit 2 has the value X With Session scope, both Hit 1 and Hit 2 now have the value X
Hit 3 has the value Y Hit 1, 2, and 3 now have the value Y, as this value has overwritten previous values
When assigning a USER Scope:
The last value set for a Hit with User Scope will apply to present and future sessions for a User.
(Note, the same User applies here when cookies have not been deleted from the Users Browser).
Hits, in Session 1, have the value Basic Account.
Hits, in Session 2, have the value Intermediate Account. Now Hits in Session 2 onward will have the value Returning User.
Hits, in Session 3, have the value Premium Account. Now Hits in Session 3 onward will have the value Premium User.
The flow chart below will explain this a lot more clearly.
When assigning a PRODUCT Scope:
For a site that has implemented Enhanced eCommerce, a Custom Dimension with Product Scope can be created. This means when a particular Product is purchased, it won't just have a Product Name and ID - it will also have another value assigned to it, according to your own specifications. This value will be associated with each Product exclusively to ensure that every value can be tied back to a precise Product.
For example, we sell Jellyfish t-shirts and want to know which color is purchased most Red, Blue, Green, or Purple:
Product Purchase #1 with value = Red
Product Purchase #2 with value = Blue
Product Purchase #3 with value = Green
Product Purchase #4 with value = Blue
This assigns a color to the product. From this, we can conclude how many Red, Blue, Green, and Purple Jellyfish t-shirts were purchased.
So in total:
1 Red Shirt + 2 Blue Shirts + 1 Green Shirt were purchased
Now, we COULD add the color value into the Product Name, but when looking at reports, we may want to compare the number of Jellyfish t-shirts purchased in an aggregate, compared with the number of Jellyfish hats purchased, for example. So with this implementation, we can always filter down further into the specifics of our data, whilst still having a collective number for every different type of product we sell.
Just like Custom Dimensions, Custom Metrics also must have a Scope applied.
For a Custom Metric, the Scope can be one of the following:
Assign the metric to specific hit level dimensions, e.g.. Pageview, Event, Transaction, and Social Interaction
>Product (For Enhanced eCommerce only)
Assign the metric to a particular Product
For metrics, you're also able to configure the format of the metric and whether to apply maximum or minimum values that you want processed and displayed in your reports will it be an integer, currency or time? And what minimum and maximum values could we apply to this? It's a little simpler to assign the scope here for your most important metrics.
When assigning a HIT Scope:
Your Custom metric will be sent with all hit level dimensions (Pageviews, Events, etc.)
With various social sharing buttons on our website, we want to track how many users on our site are making use of these and sharing articles. We can define a Custom Metric that will count every time a user clicks on this.
To be specific, we could have a Custom Dimension with Hit Scope per Social Network Share (e.g.., Facebook Share), and then create a Custom Metric with a Hit Scope to go along with this, named Total Social Shares.
When assigning a PRODUCT Scope:
For any transaction made, various metrics are already collected with Enhanced Ecommerce, such as product revenue and quantity. To assign a product scope to a Custom Metric, means it will have the power of relating to a Custom Dimension that also has a product scope.
We can set up a Custom Metric to collect the amount of Profit we earn on each item sold. This will allow you to view your product data against profit, and rummaging deeper into the data, we could see where converting users are coming from most and hence see which channels are the most profitable.
So there we have it. A nice (sort of) little summary about the Scope of Custom Dimensions and Metrics, and how to assign these correctly in diverse situations. As you can see, by assigning the incorrect scope, many of those important user interaction values could be overridden, and hence not collected within Google Analytics.
It can take a little getting used to, but once you have a grasp of it, it'll soon become second nature and you'll be flying through the Analytics world, armed with your trusty Dimensions and Metrics.
In Part 3 of this series, we'll take a look at a few real-life examples of what Jellyfish has implemented and the advantages it brings to reporting.