GA Custom Dimensions & Custom Reports

Written by
Typical Read
15 minutes

Learn to track page performance, user behaviors, personas and more with the power of GA Custom Dimensions.

Creating audience segments is one of the most important things you can do with an analytics tool. When segmentation rules do a good job of highlighting motivations of visitors, behaviors of each segment help make sites become more relevant to each group. This will increase the likelihood that your site will deliver on your goals.

GA already lets you segment more than 130 dimensions. With Universal Analytics, Custom Dimensions (aka. Custom Variables) can be used to track even more. Once you know how to use them, they’ll become a powerful tool in your analytic arsenal.

GA Custom Dimensions: A Complete Guide

  • What are GA Custom Dimensions?
  • How to Implement GA Custom Dimensions
  • Building GA Custom Dimension Reports
  • Uses for GA Custom Dimensions

    What are GA Custom Dimensions?

    GA Custom Dimensions are a way for you to track extra stuff that standard reports don’t. Instead of being dependent on what GA hands you out of the box, you’re actually able to track whatever you think is important!

    Custom Variables = Custom Dimensions

    GA Custom Dimensions are the same as Custom Variables from the classic version of GA. Think of them as the “2.0” of Custom Variables. But, unlike Custom Variables, which had a maximum of 5, the maximum amount of Custom Dimensions you’re allowed to have is 20 (Google Analytics Premium users get a whopping 200 of them). Apart from that, Custom Dimensions and Custom Variables are essentially the same. They both allow Google Analytics users to track anything they specify.

    Sadly, Custom Dimensions can’t be found as a primary dimension in the same place the Custom Variables were found. You used to be able to find your Custom Variables right in the middle of the action, the place the rest of your data was at as well: the Reporting tab.

    Google Analytics being the kings of usability they are, decided the Custom Dimensions needed to be in a different spot altogether. Note, it’s not even in the Reporting tab, but in the Customization tab, which can be found at the top:

    GA Custom Dimensions

    But this isn’t all. You see, Google Analytics really wants to make you feel you’ve earned the data they’re giving you. Before you get to the good stuff, you’ll have to jump some hoops. I’ll go over that a little later in Building GA Custom Dimension Reports.

    Beware of Data Sampling

    Sampling in Google Analytics (or in any analytics software) refers to the practice of selecting a subset of data from your traffic and reporting on the trends detected in that sample set.

    This generally isn’t a problem. If you’re in one profile that accounts for 99+% of the total traffic to the site, you apply a segment and you’re looking at an 80-90% sample, then it can be generally pretty accurate. You have to be aware that they’re not precise numbers, so if you need to pay authors based on pageviews of their articles, you definitely don’t want to do it based on a sampled report. However if you’re just looking at keywords or general trends an 80%+ sample rate is very usable.

    When it becomes a problem is when you see particularly small numbers. With numbers under 1%, you can be pretty sure that it’s junk data. Once the sample reaches a certain point, it’ll become obvious. You’ll see the same number repeated over and over and over. 330 visits on this campaign, 330 visits on that campaign, etc. But even before that point, the data can be very inaccurate.

    If you see a little yellow box at the top of your report that looks like the screenshot below, you’re getting sampled data.

    Data Sampling

    Here’s a few reasons why Google will start using sampled data in your reports:

    • When you apply advanced segment or secondary dimension to a Universal Analytics report.
    • When you view/request a report that is based on more than 250,000 sessions.
    • When you view/request a multi channel funnel report which has got more than 1 million conversions.
    • When you view/request a flow visualization report (users flow and goal flow) that is based on more than 100k sessions.
    • When your query for data that is not available in aggregate. This is quite common in case of custom reports. So whenever you are using custom reports in Universal Analytics, the data is being sampled.

    For more information on data sampling, see About sampled data.

    How to Implement GA Custom Dimensions

    Utilizing GA Custom Dimensions on your site is a cinch. Contrary to Custom Variables being created and sent within GA code on a page or application, Custom Dimensions must first be created within the Admin interface of each GA property. It’s a two-step process where step one is setting up the Custom Dimensions in GA. Step two is using the analytics.js library to implement the Custom Dimensions into your code snippet.

    Step 1: Create the GA Custom Dimensions

    1. Navigate to the Admin interface of the property you would like to create Custom Dimensions in.
    2. Under the Property (middle) column click on the Custom Definitions tab and select Custom Dimensions.
      Note: If Custom Dimensions is not an option, you will need to upgrade your property to Universal Analytics.
    3. Click the New Custom Dimension button.
    4. Give your Custom Dimension a name.
      Note: If you are transitioning from using Custom Variables to Custom Dimensions, you will likely want to use the same naming convention for Custom Dimensions.
    5. Give your Custom Dimension a scope. Your options for scope are:
      In Google Analytics, Custom Dimensions are sent along with other hit types, including pageviews, events, or ecommerce tracking calls. If the scope is set to Hit the Custom Dimension value will only be applied for the hit it was attached to.
      A scope of Session applies the Custom Dimension values to all hits of a user’s session, regardless of when the Custom Dimension occurred within the session. For example, if the fourth hit of a session included a Custom Dimension value with a Session level scope, the Custom Dimension value will be attached to all preceding and future hits within that session.
      User scoped Custom Dimensions are very similar to Session scoped Custom Dimensions; however, with User scoped Custom Dimensions all future session hits of the user will also contain the Custom Dimension value.
      Note: It is important to note that User scoped Custom Dimensions will only apply to the current and future sessions. Historical user sessions will not be reprocessed to include the Custom Dimension value, even if it is set to a User scope.

    For information on how to configure Custom Dimensions through the GA interface, see Google’s article, Create and edit Custom Dimensions and metrics.

    Step 2: Deploy Custom Dimensions

    There’s two ways to deploy the GA Custom Dimensions you created in the previous step:

    1. JavaScript (analytics.js)
    2. Google Tag Manager

    Deploying GA Custom Dimensions with Google Tag Manager

    Not a developer? No problem. Use Google Tag Manager to deploy your GA Custom Dimensions without any coding knowledge. Take a look at Custom dimensions with Google Tag Manager for more details.

    Deploying GA Custom Dimensions with JavaScript (analytics.js)

    Updating your tracking code to enable GA Custom Dimensions is simple. Just remember though, GA Custom Dimensions data may only be sent with an existing hit.

    For example, to send a Custom Dimension for a pageview type hit with the index 15, you can use the send command:

    ga(‘send’, ‘pageview’, {
    ‘dimension15’: ‘My Custom Dimension’

    Some cases may require you to send GA Custom Dimensions with all hits on a page or for the lifetime of the tracker). In this case, you can use the set command:

    ga(‘set’, ‘dimension5’, ‘custom data’);

    Read the Custom Dimensions and Metrics Section in Google’s Field Reference document for the specific format of how to send this data.

    Building GA Custom Dimension Reports

    Currently, GA doesn’t offer a standard report that allows access to Custom Dimensions easily. In the future we’ll see better standard reports for this type of information, but for now there’s a few steps involved. For now, we’ll use Custom Reports to build a report for our Custom Dimension data.

    Below, I’ll walk you through how to build a report using a GA Custom Dimension called, author. Since author data isn’t available by default in GA, it makes a great example of how to use Custom Dimensions. This is useful for analysts trying to understand which authors have the most popular content.

    Step 1: Configure a New GA Custom Dimension

    First, configure a new GA Custom Dimension in GA. The name should be author and the scope should be set to Hit. Once configured, the new GA Custom Dimension will be assigned an index. For this example, let’s say the index is 5.

    Next, add the code to your site. If your page is written in PHP, the actual author of the page will probably be stored in a PHP variable like $author. In your PHP template, you can use this author variable to pass the author value to the GA Custom Dimension:

    ga(‘send’, ‘pageview’, {
    ‘dimension5’: ‘<?=$author?>’

    Now we can jump into building the actual report!

    Step 2: Build the Custom Report

    1. Sign in to Google Analytics.
    2. Select the Customization tab, at the top of any page in Analytics.
    3. Click + New Custom Report from the top of the table.
      If you don’t see this option, select Custom Reports > Overview in the left navigation.

    4. Enter a Title.
    5. (Optional) Click + add report tab.
      Every report has at least 1 tab, but you can add more. When you add more tabs, all the following information applies to the tab that’s currently highlighted.

    6. Select a report type: Explorer, Flat Table, or Map Overlay.
      You need to select a new report type for every tab you add to the report. Each tab can have a different report type. For example, you could create Tab 1 as a Map Overlay and Tab 2 as a Flat Table. This would allow you to have multiple tabs to have different visualization types in one report.

      The standard Google Analytics report. Includes a line graph and a data table that includes dynamic elements like a search/sort option and secondary dimensions.
      Flat Table
      A static, sortable table that displays data in rows.
      Map Overlay
      A map of the world. Different regions and countries display in darker colors to indicate traffic and engagement volume.
    7. Define your Metric Groups by clicking + add metric. Find of type Pageviews in the dropdown that appears.
    8. Define your Dimension Drilldowns by clicking + add dimension. Find or type author in the dropdown that appears.
      The options for each report type vary because each type displays data in different ways.

    9. (Optional) Click + add filter to limit the report to specific dimensions.

      This lets you restrict the data that appears in the report. For example, if you create a report with the dimension Browser Version, you could add a filter to display only specific browsers in the report by creating an Include filter on the dimension Browser, with the Exact match of Chrome. With this configuration, you would only see data in your report for the Chrome browser, so you could compare performances of each version of Chrome, and exclude all data from other browsers.

    10. (Optional) Select where this report should appear. Use the dropdown menu to select specific views, or select All views associated with this account to allow this report on all views you have access to.
    11. Click Save.

    Uses for GA Custom Dimensions

    It’s important that detailed data be gathered from site users. The more detailed, the better decisions you’ll make. Here’s some examples for how you might want to use GA Custom Dimensions in your projects.

    Pro Tip: Use a Google Analytics debugger to verify the data you’re sending is working as expected. There’s nothing worse than collecting data for months or even years then finding it’s been reporting incorrectly.

    Check out David Walsh’s post on Google Analytics Debugging with ga_debug.js. If you’re not a developer, there’ also a Chrome extention you can install.

    GA Custom Dimensions for Content Generated Sites (Blogs)

    Content sites rely on getting people to consume content, the more the better. So, it’s important to be able to really parse out what content works, and what doesn’t.

    Track Authors Performance

    If you have multiple authors, create a GA Custom Dimension for authors. This way you can segment visits that include that author or just look at that author’s performance.

    // Dimension: Author
    // Index: 1
    // Options: article author
    ga(‘set’, ‘dimension1’, ‘Ben Marshall’);

    Track Category Performance

    Same as the authors, track your categories. You’ll be able to see which perform better and where best to focus your efforts at.

    // Dimension: Category
    // Index: 2
    // Options: article category
    ga(‘set’, ‘dimension2’, ‘JavaScript’);

    Track Tag Performance

    You might uses tags on your site to boil down different non-category topics. Use a GA Custom Dimension to see what tags and sub areas are interesting to people across various categories.

    // Dimension: Tag
    // Index: 3
    // Options: article tag
    ga(‘set’, ‘dimension3’, ‘Google Analytics’);

    Track Users Who Comment

    Commenters are more likely to return to your site and are more engaged. Use a GA Custom Dimension to track a default value of Uncommented until the user comments. Once they have, record it and you’ll be able to see the behavior of these two types of users across the site.

    // Dimension: Comment Status
    // Index: 4
    // Options: Commented | Uncommented
    ga(‘set’, ‘dimension4’, ‘Commented’);

    Track Socially Sharing User Behaviour

    With GA Custom Dimensions you can track users that share your sites content. For example, when they click a link to share on Twitter or Facebook. In addition to tracking that as an Event, use a Custom Dimension to segment that traffic.

    // Dimension: Social Shares
    // Index: 5
    // Options: social network
    ga(‘set’, ‘dimension5’, ‘Facebook’);

    Custom Dimensions for Ecommerce Sites

    Ecommerce sites are different, you’re more interested in product performance. You can use GA Custom Dimensions to gain valuable insights in user behavior to help make decisions to boost sales.

    Track a Product SKU

    Track which products your visitor’s view during their visit. Some might not get purchased, but lead to other conversions and other insights. Create a GA Custom Dimension to track the behavior of users that view specific products.

    // Dimension: Product SKU
    // Index: 6
    // Options: the product SKU
    ga(‘set’, ‘dimension6’, ‘SKU12345’);

    Custom Dimensions for Lead Generation Sites

    Lead generation sites are all about getting people to contact you. This mean you may not necessarily care about the same things a blog or a ecommerce site does.

    Track Leads

    If someone fills out an appropriate contact form, track them as a lead. With this data you can analyze their behavior to find how leads differ than non-leads.

    // Dimension: Lead
    // Index: 7
    // Options: Lead | Non-lead
    ga(‘set’, ‘dimension7’, ‘Lead’);

    Track Newsletter Subscribers

    Maybe they’re not a lead, but they subscribed to your email. Use a GA Custom Dimension to see how often they come back, if the newsletter converts, etc.

    // Dimension: Newsletter Subscribers
    // Index: 8
    // Options: name of newsletter
    ga(‘set’, ‘dimension8’, ‘Weekly Digest’);

    Track RSS Feed Subscribers

    Same thing but with your RSS feed. Is it any good? Does it convert people to leads?

    // Dimension: RSS Subscribers
    // Index: 9
    // Options: name of RSS feed
    ga(‘set’, ‘dimension9’, ‘Most Popular Posts’);

    Track User Demographic Information

    You could track a whole slew of demographic information with GA Custom Dimensions. Especially true if you have a form that collects this sort of data when they fill it out. How do 16-year-old male leads react differently to your content than 18-year-old female leads?

    // Dimension: Gender
    // Index: 10
    // Options: gender of user
    ga(‘set’, ‘dimension10’, ‘Male’);

    Track Performance of Promotional Offers

    They sky is the limit when using GA Custom Dimensions to track performance of promotional offers. For instance, the conversion rates of a site that uses different header images to drive internal promotions can be tracked. Or it could just be a marketing message you want to ensure they’ve seen, and how it affects your their behavior.

    // Dimension: Promotional Header Image
    // Index: 11
    // Options: June | Memorial Day | Christmas | etc.
    ga(‘set’, ‘dimension11’, ‘Memorial Day’);

    Custom Dimensions for Self Service Sites

    These are the type of sites that are more about helping people and getting information into their hands (ex. help desk, with support articles).

    Track User Type (Personas) Behaviors

    Have different user types or personas? Use a GA Custom Dimension to track behavior of those users.

    // Dimension: User Type
    // Index: 12
    // Options: Logged In | Logged Out | Premium | Free | Investor | etc.
    ga(‘set’, ‘dimension12’, ‘Premium’);

    Track User Behaviors Who Contact Customer Service

    Sometimes emailing or contacting customer service is a good thing on these sites, and sometimes it’s a failure. Besides just tracking it as a negative goal, track it as a GA Custom Dimension. You’ll be able to see the differences between users who did contact customer service, and those who didn’t.

    // Dimension: Customer Service Contacted
    // Index: 13
    // Options: Contacted | No Contact
    ga(‘set’, ‘dimension13’, ‘Contacted’);

    Track Complaining User Behaviors

    Allowing users to submit complaints? Track their behaviors with GA Custom Dimensions. This can help provide insight on what lead to the complaint.

    // Dimension: Complaints
    // Index: 14
    // Options: Complainer | Non-complainer
    ga(‘set’, ‘dimension14’, ‘Complainer’);

    How do you use GA Custom Dimensions on your site? Comment below! I’d love to hear how other analysts are using GA Custom Dimensions to segment their traffic.

    Additional Resources

Join the conversation.

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

All comments posted on 'GA Custom Dimensions & Custom Reports' are held for moderation and only published when on topic and not rude. Get a gold star if you actually read & follow these rules.

You may write comments in Markdown. This is the best way to post any code, inline like `<div>this</div>` or multiline blocks within triple backtick fences (```) with double new lines before and after.

Want to tell me something privately, like pointing out a typo or stuff like that? Contact Me.