Monday, April 21, 2008

Combining sources in Google Analytics using a filter

Understanding where our users come from and how they use our site is essential to improving it. Google Analytics is a great tool for this purpose. One drawback is that traffic from sources which use different subdomains for load balancing - such as Hotmail - shows up as hundreds of different sources.

It's simple to use a filter to combine certain traffic sources into one. With a bit of help from the Analytics Help group, all it takes is to create a custom filter, set the type to "Search and replace", the filter field as "Campaign Source" (NOT "Referral", which was my first attempt), a regular expression for the search string (for example "[a-zA-Z0-9]*\.[a-zA-Z0-9]*\.mail\.live\.com"), and a consolidated string for the replace string (for example "mail.live.com"). The filter might look something like this:



That's it! The filter will be applied to any new traffic, but unfortunately it won't be retroactively applied to old data.

Labels:

1 Comments:

Anonymous Neil said...

Google Analytics should add this to their help pages. Many thanks for posting this!

Taking it a stage further do you think it would be possible to group all online mail logins? As I send out email newsletters I get lots of other addresses such as mail.yahoo.com, webmail.ntlworld.com, webmail.tiscali.co.uk etc. They all seem to have 'mail' or webmail' in the domain. Maybe that could be the common denominator?

February 8, 2009 7:35 AM  

Post a Comment

<< Home