Reputation: 1
^mail\.(.*)?|(.*)?(web|\.)mail(.*)?
is the exact regex I'm looking to scrutinize.
For example,
etc.
Upvotes: 0
Views: 208
Reputation: 1712
Even if links in email messages should be tagged with utm_xxx
parameters, I like to clean and group my referral sources into clusters as much as possible. It is the way to go to understand effectively the sources of traffic that are missing proper tagging, and then prioritize and fix them.
The regex I use is the following, and honestly it works pretty well (it catches more than 95% of webmails that show up as referrals and can be split over dozens of subdomains like for yahoo or live, thus diluting their visibility as a source)
(messag|courrier|zimbra|imp|mail)(.*)\.(.*)\..{2,4}
You may update the subdomain names with values frequent in your area. The end catches any domain using a tld of 2-4 chars, and any domain. I output the result as
Output To -> Constructor : Campaign Source : Webmail - $A3
Upvotes: 0
Reputation: 37305
To be totally honest, its a fruitless effort, especially because even if you do manage to somehow do a re-write of all of the email domains that referred people to your site, there are 3 reasons it won't work:
Instead, if you're looking to segment the referrals of all of email referrals for tracking in Google Analytics, you should use utm variables in your URLs.
If you tag your URLs with utm_source
and utm_medium
, you'll be able to track them, regardless of the 3 restrictions listed above.
Traditionally, you'd set utm_medium
to be email, and utm_source
to be the mailing list name, and utm_campaign
for the name of the specific campaign.
You can get assistance in building the URLs here: http://www.google.com/support/analytics/bin/answer.py?answer=55578
Upvotes: 1