Defining Audiences With Google Analytics Custom Dimensions

March 17, 2015
Defining Audiences With Google Analytics Custom Dimensions

In 2012, Sayf introduced you to 20 useful ways to use custom variables. He provided five custom variables for each of the four main website types: Content Sites, Ecommerce Sites, Lead Generation Sites, and Self Service Sites.

These are all still applicable today, even though we refer to these custom data definitions as custom dimensions and metrics in Universal Analytics instead of custom variables.

Rather than provide you with 20 more ideas for custom data – my goal is to instead inspire you to take another perspective on custom dimensions. Whether you are redesigning your website, deciding on content for a landing page, or creating advertisements for digital or traditional media, it truly pays off to know exactly who your target audiences are.

You may already have a defined set of target audiences or even a handy list of well-researched user personas – wouldn’t it be great to be able to look at your GA data and instantly see which of your users belong in each of these defined groups?

Or, you may be in the process of refining your knowledge about your target audience and could use additional insight that could be provided by GA. Either way, we are going to look at a few different industry types and provide some ideas on using custom dimensions to help you discover more about your target audiences.

Setting a Custom Dimension

Before we jump into some of those industry examples, we’ll first briefly review how to set up custom dimensions.

Custom Dimensions

Many of our examples will use user-scoped custom dimensions, as they are going to help us define audience members and we want to remember this audience any time they come back to the site. Keep in mind, however, that if you assign a user-level custom dimension to a particular visitor more than once, the last dimension applied will overwrite the previous value.

  1. Custom dimensions must first be created in the Google Analytics interface. In your Admin settings for the property you would like to set a custom dimension in, select Custom Definitions and then Custom Dimensions:
  2. When you click the +NEW CUSTOM DIMENSION button, you will give your dimension a name and then select the scope of the dimension. The scope defines to which data the dimension will be applied – at the hit-level, user-level, session-level or product-level. For more information on scope, check out Google Developers documentation.
  3. Now that you have set up your custom dimension within the GA interface, you will need to get GA to populate that dimension with values that you define either via JavaScript on particular pages of your website, or, (our preferred way) via Google Tag Manager. Remember that custom dimensions must be sent to GA alongside another hit, such as a pageview or an event hit (regardless of scope).

Sending the Data to Google Analytics

When you send the information for this custom dimension to Google Analytics, you need to know the “index” number of the custom dimension that you just set up. This tells Google where to store the information you’re sending. As for the value, you’ll either need to pull this information from your server, or extract it from some action the user take, or infer it from actions or pages visited.

If you are going to do this with JavaScript on your webpage(s), the code might look like this:

Pageview hit example:

ga('send', 'pageview', {
'dimension1': 'dimension value'
});

Event hit example:

ga('send', 'event', 'category', 'action', {
  'dimension1': 'dimension value'
});

If you are going to use GTM instead, you will need to either define the dimension entirely in a particular tag or utilize a dataLayer to set the dimension value programatically.

For example, if you have a GTM tag that tracks form submissions as a GA event and you would like to define users who submit the given form as belonging to the custom dimension of “Prospective Students,” you would simply need to add a custom dimension to the form event tag in GTM. Under More Settings in your form event tag in GTM, select + Add Custom Dimension and enter the index number assigned to the dimension within the GA interface and then add the value of “Prospective Student.”

cd-pageview2

If your custom dimension’s value depends on information programatically set by your server, you will need a data layer to allow GTM to grab those values and send them to GA with a particular hit. That dataLayer would look like this, where “Prospective Student” when the page is loaded:


var dataLayer = [{
    'audience' : 'Prospective Student'
    }];

This code needs to be placed just above your GTM container on applicable page. See more information on how to set up your data layer here.

Now that we have briefly described how custom dimensions can be defined, let’s look at some examples of how we can use them to more effectively understand the audiences visiting our websites.

Educational Institutions

Educational institutions typically are interested in audience categories such as these: Parents, Students, Prospective Students, Alumni and/or Donors and Military.
We could easily set up a custom dimension that declares users who view military-specific content as part of the Military audience by placing a custom dimension on pages containing military content because this section specifically applies to military members (active duty or veteran) – so we could be fairly confident in the accuracy of this custom dimension.

The other categories may not be as reliable, though. For instance, parents might browse through the Parent section of the site as well as the Student section of the site while searching for certain types of information, such as on-campus housing options, activities, etc. Therefore, it would benefit us greatly if we could collect user-entered data.

One way to do this would be to provide a drop-down box in the utility nav, for example, and let visitors select whether they are a parent, student, prospective student, alumni etc. This would let you cater the content the user is seeing to their self-identified persona, as well as allowing us to set a custom dimension based on their selection for use in GA.

iam

Then learn from their behavior and continue to customize and optimize your website, messages and advertising based on what you learn. If they navigate to other sections of the website after this selection you would still have their audience type saved in GA. Additionally, if the user submits a form to request information, have them choose which group they belong to as one of the form fields.

Retail

Say your company sells running shoes, and your marketing team has put together a couple user personas that describe your target audiences based on your brand identity. For fun, let’s say those personas look like this:

Cindy Single Mom: Her life is extremely busy between work and shuttling her kids around to their various after-school activities. Her kids are her number one priority, although she has started making time for herself as well. She recently started BeachBody workouts and eating healthy, and she promotes her healthier lifestyle to all her friends. She is now an avid marathon runner.

Demo: age 26-35, living within 40 miles of our store

Interests: kids, exercise, healthy eating, active lifestyle, running, marathons

Carly College Student: Carly is an active college student and avid foodie. She loves trying new restaurants and tries to choose healthier options whenever possible. She likes shopping with her friends and staying fit.

Demo: age 18-25, living within 40 miles of our store

Interests: gym, healthy eating, clothing

In this case, you cannot simply ask users which group they belong in. And, not every visitor to your website will exactly fit these two targeted personas. However, with some strategic effort we could start to recognize which users do belong in each category – and we could then start to look at our GA data segmented it by each persona.

For example, you could start by setting up a media campaign in Facebook. Create an audience list for each persona (targeting by geolocation, age, interest categories, relationship status, etc.). The promotional posts or ads should direct users to a page on your website that has a query parameter that defines the persona you are targeting. This piece of data can be captured as a custom dimension.

The example landing page that you would use might look like this:

www.example.com/landing-page.html?utm_source=Facebook&utm_medium=paidSo…&persona=Cindy

To capture the persona as a custom dimension we will use GTM. First, in your Google Analytics property, define a custom dimension called “persona”. Remember the index key.

In GTM, create a new variable called {{persona}}. Set the variable type to “URL” and the component type to “Query.” The query key will be “persona.” This will populate the GTM variable with the value of the query string “persona.”

In your GTM pageview tag for Google Analytics, you will find Custom Dimensions under More Settings. Add a new dimension, apply the index number assigned to your persona custom dimension and as the value select the variable {{persona}}.

If you have a database of customers who have purchased in the past, and those customers have provided information about themselves (email address, zipcode, interest categories, etc.), you could create a Custom Audience in Facebook based on that data as well. You would then be able to cross-reference that data with Facebook’s data, which would allow you to not only target by interest category but also to identify age demographics as well as reach other individuals who look like each audience list you have defined (further growing your audience reach).

This approach may also be interesting to try out on brand advocates such as by targeting users who are subscribed to your company on Facebook.

Healthcare/Pharmaceutical

If your website exists to educate consumers about specific health conditions and pharmaceuticals that you make, you are likely targeting Doctors and Consumers alike.

Here’s an example of where a simple pageview custom dimension might work well since the content on your website is likely very specifically tailored for each audience. Consumers with a condition that could make them a prospective consumer for your product are going to generally avoid content geared towards doctors because it is typically full of legal and industry jargon; whereas doctors are going to need to review that information.

You may even have an option to let the user select which type of content they are looking for (“for doctors” vs “consumer info”), which would allow you to set a custom dimension based on that selection. Additionally, users that download specific pieces of content tailored to consumers may be labeled as such with a custom dimension (such as when they download a pamphlet or pharmacy request form, for example).

Banking

Another way to look at your audiences, which may be especially useful for banks, is from the perspective of customer lifecycles. For example, who is considering buying a home? Are some of their users looking for student loans or business financial advice? There are many branches of banking, each providing insights to an individual’s lifestyle and interest. You could set up custom dimensions that help define your users as types of audience members. Here are some example audiences:

  • Home Buyers (searching for home loans and mortgage rate
  • Students (searching for student loans and possibly interested in opening a checking/savings account)
  • Business (seeking financial advice and business loans)
  • Personal (interested in managing their checking/savings accounts online and personal loans)

Content areas viewed by users hint toward their area of interest, but we could be more certain by using a custom dimension that is defined by content collected from the user themselves – such as in a form submission. If an individual submits a form requesting for information about mortgage rates, they could be defined with a custom dimension as a potential home buyer. This would be a particularly interesting audience to look at in GA due to the ROI of potentially landing a mortgage loan. Additionally, if you are capturing data on logged-in users you may also be able to set custom dimensions based on that data as well (just like we described in the Retail industry example).

Another example would be identifying users interested in student loans. Prior to the start of a new semester, the bank could promote its student loans with various banners across the website or via promoted social media. When a user clicks on one of these banners and is directed to a landing page, a custom dimension could be set via either the pageview or with query parameters that identifies that user as a potential student. We could also remarket this user with advertisements to open a checking/savings account.

Parents of students may click on those banners as well, however, so it would be more accurate to define this audience based on user-submitted information, just like we described for potential home buyers, for example.

What’s Next:

Once you have set up some custom dimensions that help you identify your users, look for patterns in their behavior and oddities that signal that your dimensions may need further refinement. This should help provide more insights that you may otherwise would not have been able to generate and ultimately enable you to more effectively tailor your advertising to your audience.

Custom dimensions can be viewed alongside regular reports in Google Analytics as Secondary Dimensions, or you can use them to create custom reports, dashboards, or advanced segments.

Note – Sayf also provided us with a great post on how to see custom dimensions in your Analytics reports.

I hope these ideas encourage you to look at custom dimensions from a different perspective and try aligning them to your targeted audiences. Now it’s your turn – can you think of creative ways to identify your audience with custom dimensions?