Scott Offord
Scott Offord

Reputation: 1

What's a reasonable instance where this regex might not catch a webmail referrer in Google Analytics?

^mail\.(.*)?|(.*)?(web|\.)mail(.*)? is the exact regex I'm looking to scrutinize.

For example,

etc.

Upvotes: 0

Views: 208

Answers (2)

Open SEO
Open SEO

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

Yahel
Yahel

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:

  1. You can't possibly account for all of the email domains out there.
  2. If the email is hosted on HTTPS, and your pages are HTTP, you won't see a referrer anyways.
  3. A very significant portion of the email using population uses non-web mail, like Outlook, Entourage, Mac Mail, iPhone Mail, Blackberry Mail, Android Gmail, to name a few, that never have a referrer.

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

Related Questions