How To Track Marketing Personas in Google Analytics

By May 27, 2014 Analytics No Comments
google analytics marketing personas

These instructions are for sites that have upgraded to Universal Analytics (which you should do anyway to get access to new features sooner). Find out how to upgrade to Google Analytics or ask us to do it for you

Every business has (or should have) marketing personas for their users/customers. Whether it’s corporate customers vs small business, baby boomers vs newly weds, subscribers vs one-offs, we divide our audience into personas in order to market to them more effectively. We target our messages, hone our products and design our landing pages to suit the different audiences we cater to. Seeing how those different audiences behave on our site and react to our offers and information, can be invaluable marketing information. Google has previously allowed you to track lots of different customer personas in Google Analytics using Custom Segments, but now with Universal Analytics and Google Tag Manager it is easier than ever to set up.

Custom Segments are now divided into Custom Dimensions and Custom Metrics. Since we’re looking at persona’s, we will be working with custom dimensions. By creating a custom dimension for your personas, you will be able to drill down into any analytics report that allows second dimensions to see behaviour by your personas. For example, if you look at the mobile usage report, and then choose a custom dimension for b2b customers vs b2c customers, you can see which personas use which devices more often.

Custom Dimensions

The kind of personas  you might want to track could include:

  • B2B vs B2C customers
  • Product Group Interest
  • Demographics, e.g. Gender/Age/Location

The list is endless depending on your business

4 Steps to Setting Up Persona Tracking

  1. The first step is critical – you need to determine how someone will qualify to belong to a dimension. For example, you might differentiate B2B from B2C customers by the section of the website they visit. For gender or age, they will need to declare it somewhere in the site (e.g. in a form), or you will approximate depending on items they have viewed.  Make sure you know what qualifies a person to belong to a certain persona.
  1. The next step is to go to the Admin section of your Google Analytics, and let Google know the custom dimension you want to set up:

google analytics custom dimensions

custom dimensions google analytics

Simply give it a name, scope and make it active. Since we’re talking about Persona’s, you will want to use ‘User’ as the scope. This means that when someone comes back to your site repeatedly, we will be able to save their persona between sessions.

When this step is completed you will see an “Index” associated with your new custom dimension. Note this number down, because you will need it for a later step.

  1.  In this step you use a Google Tag Manager macro to say when a visitor has been assigned to a persona. This is where you need to tell Google what qualifies someone to be in your custom dimension, and what value you should give them.
  • Create a new macro
  • Name the macro your dimension. E.g. Persona, Gender, Business Type or Customer Type
  • Use one of the macro types to assign a value to the visitor for this dimension.  There are a number of different macro types you can use to do this. One example is custom java script, and below we have a custom java script which assigns visitors to a dimension depending on pages they have visited


function() {
//declare the variable 'persona'
var persona;
// use the {{url}} macro to identify the part of the site you're on
if({{url}}.indexOf(“/part-of-url-that-qualifies-your-segment")>=0){
persona = "B2B";
}
else if({{url}}.indexOf(“/part-of-url-that-qualifies-your-segment")>=0){
persona = "B2C";
}
//whatever is returned is what the macro will be set to
return persona;
}

If you want to use this code, customise to your URLs and needs and then test thoroughly in Google Tag Manager debugger before making live.

Another common macro type to use is a Data Layer variable. You can either put data layer variables directly hard coded onto a page, or you can have them pushed to the data layer when an event has been fired. Pushing values to the data layer on an event could be used to gather information from forms.  E.g. when someone ticks a gender box, you can push the value they choose to the data layer. A great explanation of the data layer can be found here or feel free to ask us if you need help setting up yours.

You can also read more from Google about how to set your macros.

  1. Finally, the last step is that you need to go to your Google Analytics installation in Google Tag Manager and let it know about the macro you just created
  • Open your Analytics Tag, then go to “More Settings”
  • Go to Custom dimensions and for each of the indexes you have created, name the macro to match it.

Custom Dimensions Tag Manager
Important Notes

  • Thoroughly debug any changes to your Google Tag Manager, and watch your analytics closely in the days following the change
  • Note that personas can be overwritten, for example if someone first visits your B2B section and then later visits your B2C section, their persona value will change from B2B to B2C. The most recent persona value will be the one you see in reports.
  • Because of dimensions being ‘overwritten’ you should be careful assigning ‘default’ values to your macros. E.g. if you have your macro set to B2B for some pages, B2C for others, and “None” for every other page, “None” is likely to override your B2B and B2C data. If people visit your shopping cart, contact page, home page, blog, or any page not assigned as B2B or B2C, their persona type will change to ‘none’. Sometimes it’s better not to assign a default value.

Image Source: I’ve tried to credit this image, but I could only find this source, let me know the original owner if this is not it http://simpsons.wikia.com/wiki/File:Season_20_Cast_Poster.PNG

One New Idea To Help Achieve Your Sales Goals REQUEST YOUR FREE SPARK