The business challenge
One of our Pharma clients recently approached us with a business challenge, which may sound familiar. Their business has multiple brands and operates in multiple countries. They have rolled out brand sites localised for each country. They have analytics in place to understand each individual site, but don’t have the ability to see rolled up data by country (multiple brands) or brand (multiply countries) or therapy area. With paid web analytics tools (such as Webtrends) they understand it is easy to create a rolled up view based on country or treatment area, but they wanted to know if it is possible to do it with the free version of Google Analytics…
They had 3 requirements:
1) A rolled up view with data for all web properties
2) Each territory needed to be able to connect their Google Analytics (GA) account to Adwords, because each country managed its own budget and worked with a local agency that knows their market well
3) The roll up view needed to be able to report on overall traffic for individual categories: continent, country, treatment area and drug or any combination of these.
The solution, part one: creating two accounts with two sets of tracking code
Delivering on requirements 1 and 2 was relatively straightforward. All this involves is creating two Google Analytics accounts and adding two sets of tracking code on each page. One instance of the tracking code will capture data to be added to the roll up view, and the other instance will capture data for the regional affiliate. This second instance can be used by the regional affiliate to link to Adwords. These details will obviously be different for each regional affiliate.
The solution, part two: creating custom variables and categorising each page
The 3rd requirement was a little trickier, to be able to do this one option would be to categorise each one of their pages and then set up a custom report that includes each relevant page. In other words create a report for each possible question of the type: ”Show me all traffic to country X and drug Y.” However, with dozens of sites, each having many pages this would not be a simple or time effective task.
The best way to do this is to tag each page with all the categories it belongs to. Fortunately Google Analytics allows us to do just that by using custom variables. In each hit we can set 5 different values.
To recap, custom variables are name-value pairs which allow you to refine tracking. There are 4 parameters you need to specify for each variable: position, name, value and scope. Name and value are self-explanatory, position is a value between 1-5 and you should always use the same one for any variable name – which we treat like an alias in this case. Scope can be set to visitor-level, session-level or page-level. This determines how often a value is stored against a variable name. For example if a variable is set to visitor level then successive requests could be fired throughout a visit but only the very last one would be recorded as that visitor’s values for a particular variable, and it would remain the same on a subsequent visit (until it is changed). If the variable was set to have a page level scope then a new value would be recorded for each request/page combination.
The GA documentation which you can find here is the best source of information on this, and the excellent series of articles by LunaMetrics has some good examples to understand concepts such as ‘position’ and ‘scope’.
The solution part two: tracking code to create custom reports
Each page is tagged with all the categories which we are going to use to create custom reports.
Each custom variable is set by a separate line of code, so the tracking code for the roll up view will need to include the following lines:
_gaq.push('_setCustomVar',1, ’Continent’, ‘Europe’, 3)
_gaq.push('_setCustomVar',2, ’Country’, ‘GB’, 3)
_gaq.push('_setCustomVar',3, ’TreatmentArea’, ‘treatment 1’, 3)
_gaq.push('_setCustomVar',4, ’Drug’, ‘drug 2’, 3)
In this case it is a page in Europe, in GB for ‘treatment 1’ and ‘drug 3’.
The Solution part two: Setting up reports
Now it is possible to create custom reports which allow us to see the traffic we received by country and drug, or any other combination of the categories above.
To do this, click on ‘Custom Reporting’ and then ‘+ New CustomReport’.
In ‘Metric Group’ add the measures you need.
In ‘Dimension Drilldowns’ select Custom Variable 2 (country) and as second ‘Dimension Drilldown’ select Custom Variable 4 (Drug)
When you run this report you will see ‘Unique Visitors’ , ‘Visits’ and ‘Bounce Rate’ by all countries, and when you click on any country you will get a breakdown by drug visited in that country.
This is how we fulfilled the 3rd requirement which was to aggregate traffic by things such as ‘treatment area’ or ‘country’ across all websites. In addition to that we made it really simple for anyone in the organisation to create reports.
Ultimately this allowed both people at the ‘coal face’ undertaking the daily implementation, along with senior management to understand and improve digital activity across countries, treatment areas and brands.
Here at Blue Latitude we believe that web traffic data should be accessible and we encourage our clients to experiment with the tools themselves, in order to optimise their marketing activity.
How do you measure and optimise your marketing activities? We welcome your tracking success stories.