Universal Analytics: Custom dimensions and metrics guide part 2

Blog | 04 Jun, 2015

Analytics expert, Manpreet Gill, follows 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 customisation 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.

The Scope

For each Custom Dimension, the scope can be one of the following:

Hit

Assign the dimension to an individual Hit – Pageview, Event, Transaction, and Social Interaction.

Session

Assign the dimension to every Hit that occurs within a single Session.

User

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.

 

Add Custom Dimension

When assigning a HIT Scope:

Each Hit that occurs within a Session will be assigned its own individual value, and 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.

For example:

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).

For example:

Hits, in Session 1, have the value ‘Basic Account’.

Hits, in Session 2, have the value ‘Intermediate Account’. Now Hits in Session 2 onwards, will have the value ‘Returning User’.

Hits, in Session 3, have the value ‘Premium Account’. Now Hits in Session 3 onwards, will have the value ‘Premium User’.

The flow chart below will explain this a lot more clearly.

Basic and premium analytics custom dimensions

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 Jelly – Shirts , and want to know which colour 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 colour to the product - From this, we can conclude how many ‘Red’, ‘Blue’, ‘Green’ and ‘Purple’ Jelly-Shirts were purchased.

So in total:

1 Red Shirt              +             2 Blue Shirts          +             1 Green Shirt         were purchased

Now, we COULD add the colour value into the Product Name, but when looking at reports, we may want to compare the number of Jelly-Shirts purchased in aggregate, compared with the number of Jelly-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:

> Hit

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

Add Custom Metric

 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.)

For example:

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 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.

For example:

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. 

Please enter a valid Name.
Please enter a valid email address.
Please enter a valid Phone.
Please enter a valid Company Name.
  • Select Service
  • Analytics
  • Brand
  • Consultancy
  • Conversion Rate Optimization
  • Display
  • DoubleClick Partnership
  • Email
  • PPC
  • SEO
  • Social
  • UX
  • Video
  • Websites
  • All Services