How to (better) track browser usage through Google Analytics
Of the importance of browser usage analysis
It is common practice when designing a new site to decide which browsers to target: the product manager must define which browsers are used by the targeted audience, while the development team has to cope with the different behaviors of those browsers.
It is one thing to define the targeted browsers when building a new site; but it is also very important, when maintaining a website over the years, to follow the evolution of browser usage for the same reasons: reach the targeted audience, and optimize development costs.
“how many of my users are now using Firefox?”, “Have users using Internet Explorer 6 or 7 migrated to IE8“?… Those are the kind of questions that every site manager should think about on frequent basis, in order to adjust the browser strategy for his site.
The limitations of Google Analytics to follow browser usage
Of course, Google Analytics provide capacities to track browser usage; but it also comes with a major usability flaw. The “browser” report indeed separates browser platforms (Internet Explorer, Firefox, Google Chrome…) and their corresponding versions (6.0, 7.0, 8.0…). That means you can easily get the percentage of your users using Internet Explorer, Firefox or Chrome; but you have no easy way to know the total percentage using Internet Explorer 8.0, Firefox 3.5…
Another “limitation” is that, for some browser platforms, Google Analytics separates all the versions including the patch levels (i.e: Firefox 3.5.4, Firefox 3.5.5, Firefox 3.5.6…). This very detailed view of browser versions makes the analysis of browser usage using Google Analytics far more complicated than it should be.
The Google Analytics browser report:
How Google Analytics filters can help
A way to build a more readable browser report is to use a set of Google Analytics filters to achieve two goals:
- Rewrite the browser versions in order to remove the extra details (“3.5.4”, “3.5.5”, “3.5.6” would be replaced with “3.5.x”),
- Report against the full browser names (concatenating the browser platform and the browser version).
Ideally, those filters should be applied on a specific website profile, to avoid erasing the raw data gathered by Google Analytics.
A step-by-step setup guide
- In Google Analytics, choose an account on which you want to track browser usage.
- Access the “Filter Manager” page to create the filters.
- Create an advanced filter for each browser rule listed in the table below. See the screenshot below.
- Create another advanced filter with the following parameters:
- Filter name: Browser program/version aggregation
- (Field A -> Extract A) field: Visitor Browser Program
- (Field A -> Extract A) rule: (.*)
- (Field B -> Extract B) field: Visitor Browser Version
- (Field B -> Extract B) rule: (.*)
- (Output To –> Constructor) field: Visitor Browser Program
- (Output To –> Constructor) rule: $A1 $B1
- Go back to the “Analytics Settings” page, and then click “Edit” on the website profile you want to use to apply those filters.
- In the “Filters applied to your profile” section, click on the “Add filter” option and select all created filters.
- Then select “Assign Filter Order” to ensure the “Browser program/version aggregation” filter appears in the last position.
- You are done, and should obtain the new browser view report (screenshot below) in a matter of hours :)
The list of filters to create:
|Filter name||FieldA -> ExtractA
(Visitor Browser Program)
|FieldB -> ExtractB
(Visitor Browser Version)
|Output To -> Constructor
(Visitor Browser Version)
|1.5 browser version (target Firefox)||Firefox||^1.5.(.*)|1.5$||1.5.x|
|2.0 browser version (target Firefox & Chrome)||Firefox|Chrome||^2.0.(.*)|2.0$||2.0.x|
|3.0 browser version (target Firefox & Chrome)||Firefox|Chrome||^3.0.(.*)|3.0$||3.0.x|
|3.5 browser version (target Firefox)||Firefox||^3.5.(.*)|3.5$||3.5.x|
|3.6 browser version (target Firefox)||Firefox||^3.6.(.*)|3.6$||3.6.x|
|4.0 browser version (target Firefox & Chrome)||Firefox|Chrome||^4.0.(.*)|4.0$||4.0.x|
|Safari 4 (target specific webkit versions)||Safari||^(526|528|530|531).(.*)$||4.x|
|Safari 3 (target specific webkit versions)||Safari||^(522|523|525).(.*)$||3.x|
|10.0 browser version (target Opera)||Opera||^10.(.*)|10$||10.x|
|9.8 browser version (target Opera)||Opera||^9.8(.*)|9.8$||9.8.x|
|9.6 browser version (target Opera)||Opera||^9.6(.*)|9.6$||9.6.x|
|9.5 browser version (target Opera)||Opera||^9.5(.*)|9.5$||9.5.x|
|9.2 browser version (target Opera)||Opera||^9.2(.*)|9.2$||9.2.x|
The “Edit Filter” page:
The new Google Analytics browser report:
You may want to adjust the rules for your own needs. There are some useful resources that list all the versions for a given browser and help to define what minor/major versions are. I.E:
- Safari: http://en.wikipedia.org/wiki/Safari_version_history
- Opera: http://www.opera.com/docs/history/index.dml#o2
The list should be updated before new browser releases become popular, as Google Analytics doesn’t apply filters on previously stored data.
(thanks to Julien Coquet for some Google Analytics tips :) )