Ideas for Google Analytics Custom Dimensions and Metrics

Google Analytics Referral Exclusions

Depending on whether you are using the free or 360 version of Google Analytics you get 20 or 200 custom dimensions and metrics to work with.

When used correctly, these custom definitions can be one of the most useful custom features in Google Analytics. They allow you to tailor your analytics to meet your needs and to match your KPI-s.

One of the most common problems related to custom definitions has been that people don’t know what exactly are the dimensions and metrics they should be tracking.

Out of the box, Google Analytics already tracks a few hundred different dimensions and metrics. In this article, we are giving you a few ideas for the custom ones you might want to add to your list.

While the main idea behind custom dimensions is to allow you track more specific things that might not be relevant to every website owner, there are some in this article that I would recommend adding to every Google Analytics setup. (Bookmark this post for your next GA setup)

Custom Dimensions

Client ID

Scope: Session

Every instance of the _ga cookie gets a unique Client ID, which is how the Google Analytics backend knows that the same visitor has visited the site multiple times. This Client ID is not exposed in any dimension you can query via the API.

There are multiple ways to access the Client ID of the current visitor, but the most intuitive solution is by using GTM and customTask.

Depending on your setup, you might try accessing the Google Analytics object directly ga.getAll()[0].get('clientId');

User ID

Scope: User

The User ID feature in Universal Analytics groups together hits, sessions, and Client IDs. It is the highest possible level of abstraction and aggregation available in Google Analytics.

User ID value is generally available for logged in users only and usually coming from your back-end/CMS. Besides tracking User ID using custom dimension, you should also configure Google Analytics built-in User ID feature.

Session ID

Scope: Session

In Google Analytics, all hits are grouped together into sessions. However, using the API or custom reports alone, you will not be able to identify if two distinct hits belong to the same session.

A Session ID is a random string generated using Javascript and it should be sent with every page view. The string changes with each page view, but it doesn’t really matter as you’re sending it to a session-scoped Custom Dimension, only the last value you send will be applied to the hits in the session.

While there are multiple solutions for creating a random string using Javascript, I am generally using something like this var session_id = new Date().getTime() + '.' + Math.random().toString(36).substring(5);

Timestamp

Scope: Hit

Unfortunately, you can’t query for the exact timestamp of a Google Analytics hit using the API. Neither can you get it in your custom reports. However, this might be very meaningful information, especially if you want to verify data integrity across systems.

Login Status

Scope: Hit

It is highly likely that users who have logged in behave differently to those who never logged in. Setting it up is fairly simple, for example, you could use GTM to check the value of a Javascript variable or look for an element that’s only visible to logged in users (i.e “My account” button in the header) and populate your dimension accordingly.

User Agent

Scope: Hit

User Agent can help you in many ways – detecting bots, debugging etc. Unfortunately, Google Analytics doesn’t give you the user agent dimension out of the box. Tracking it using custom dimensions is really simple, user agent is stored in a Javascript variable navigator.userAgent.

Page Type

Scope: Hit

Although, you should be using Google Analytics’ Content Grouping for a similar purpose, having it in custom dimension has its advantages. For example, your paga types could be home, category, product, checkout, confirmation, blog, webinar.

A/B Testing Variant

Scope: Session

While this might sound obvious to some, many novice A/B testers rely solely on the data displayed by the testing tool they’re using. Having a second source for double-checking is absolutely a must, besides, it allows for a more cranular analysis that most A/B testing tools don’t allow.

Custom Metrics

Tracking User Actions

Scope: Hit

Normally, you would track user actions using custom events. This is great but sometimes you need more context, more flexibility, just like you have with Google Analytics’ built-in metrics. That is why I’d recommend tracking your most important user actions using custom metrics, and with custom events, too.

Some actions you might want to track using custom metrics:

  • Add to Cart
  • Add to Wishlist
  • Clicked Recommended Product
  • Submitted Rating Form
  • Posted a Comment
  • Made a Reservation

You get the point. I recommend starting with your top 3-5 most important user actions.

More on this with some examples on Analytics Ninja’s blog.

Pricing

Scope: Hit

Google Analytics already tracks revenue (considering you have implemented (enhanced) ecommerce tracking). Now, to get a better context and allow for some further analysis on your financial strategies, consider adding these custom metrics.

  • Displayed Price ($160.97)
  • Original / Full Price ($190)
  • Product Level Discount ($29.03)

Based on this data, you could build reports like this

Source

Social Media Shares

Scope: Hit

Capturing social shares can give you a good insight into what content users find interesting and willing to share with their audience. Using this metric, you can compare content marketing efforts and see how well your social campaigns are doing. Capturing social shares gives you an idea of the type of content and types of the audience interested in your content so you can build niches or on top of previous success and increase your reach and look to grow your user base.

Conclusion

Custom metrics and dimensions are key to customizing your Google Analytics setup to meet the needs of your business. I recommend taking some time, thinking through your whole business logic, reading this article (and a few similar ones) once more and decide which custom metrics and dimensions would make sense the most.

Implementing most of them require some Javascript development experience and knowing how Google Analytics works would be really useful, too. In case this looks overwhelming, I strongly recommend hiring an expert.

Also, if we missed an important metric or dimension, let us know in the comments below.

Leave a Reply

Your email address will not be published. Required fields are marked *

Sign up for Reflective Data

5,000 sessions / month ×

Please enter your email

Submit

After submitting your email, we will send you the registration form.