Google Analytics Filter – Filter and Combine Traffic from eMail Sources
Filter Title: Combine Email Traffic from Gmail, Yahoo mail, AOL mail etc.
Purpose: To combine traffic from email’s, specifically email programs like gmail, yahoo, live, msn, aol etc. A quick look at your Google Analytics reports will show something like the screen shot below if you don’t use filters like these. By applying this filter, your referral reports will show cleaner data sets without “one off” visits from “by128w.bay128.mail.live.com/referral”
Filter Difficulty: easy/medium
Instructions: As with every filter, be sure to create a test profile so as to keep your main site data in tact.

Filter Name: Email Aggregation – Yahoo
Filter Type: Custom Filter, Search and Replace
Filter Field: Campaign Source Search String: ^.*\.mail\.yahoo\.co.*$
Replace String: yahoo mail (or whatever you choose to call it)
Case Sensitive: No
To create this same filter for Google, MSN/Live and others, simply have a look at the traffic sources in your reports, and change the Search String field to include mail.live.com for example. Alternativly, another way to create a filter for emails is as follows

Filter Name: Email Aggregation – Yahoo
Filter Type: Custom Filter/Advanced
Field A – Extract A: Campaign Source – (.*)\.mail\.yahoo\.com$
Field B – Extract B: Blank – Blank
Output To – Constructor: Campaign Source – mail.yahoo.com
This will take all emails from mail.yahoo.com and reformate the refurring source in your reports to show “mail.yahoo.com”
Filter Credits: Carlos del Rio at User Driven Change
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.



Nice… but you forgot to say WHERE or HOW can we do this… I cannot find in google analytics the option to get to the screens you’ve shown…
Sylvester, you need to select “Analytics Settings” in the top left corner next to view reports. Good luck!
Great thank you for the does this filter only reflect future visits or will it adjust past records of referrals? Thanks.
Great! Thank you for the article.
I can’t find the CREATE A FILTER button or the Search the web button referenced in the first line of Using a Filter
instructions.
I can’t find the CREATE A FILTER button or the Search the web button referenced in the first line of Using a Filter
instructions. Is it me?
Filters only affect NEW data coming into your account; existing data is unaffected.
To apply filters:
1. Click Analytics Settings
2. Click Edit for the web site you want
3. Scroll down to the “Filters Applied to Profile” section and select “Add Filter” in the heading bar