Advanced Email Referral Tracking in Google Analytics

If you have ever tried to analyze the traffic generated by email marketing campaigns in Google Analytics (GA), you might have noticed that many email service providers (ESP) are using different sub-domains which makes it very difficult to analyze the traffic. This article suggests a possible solution which is quick and easy to implement

Your Traffic Sources report might look somewhat like the screenshot below:

Unconsolidated email referrals

It’s quite difficult to analyze email referral sources when traffic is broken out this way. At the very least, you might want to consolidate all sources by providers.

While some of you might really need to analyze traffic from each webmail provider, for the vast majority is probably does not matter which email service provider a visitor happened to be using when they clicked to your site. It’s probably better to consolidate all webmail sources into one entry. Not only would this clean up your reports significantly, but it would also allow you to see the overall impact of traffic coming from webmail sources to your site.

An optional way to consolidate all webmail sources into one entry is by using filters. These filters are only applied to webmail sources so there is no need to create them under a separate profile. However, depending on other filters you might have active, you might need to reassign the order in which these filters are executed to make sure no data is lost. If you are not sure how to work with filters or what order they should be in, please contact VirtuosOnline for further assistance.

Implementation Instructions

Although we are using a “Custom Advanced” filter, the instructions below are fairly easy and straightforward to implement. As can be seen in the first screenshot above, all traffic coming from email had “mail” somewhere in the source and “referral” as the medium. So this filter takes all of that traffic and changes the source of that traffic to webmail.

  1. Login to your Google analytics account with administrator permissions.
  2. From the Dashboard screen, click on “Filter Manager” located in the bottom right corner.
  3. From the Filter Manager screen, click “Add Filter”.
  4. In the Filter Name input enter “Consolidate Webmail”.
  5. In the Filter Type section choose “Custom filter”.
  6. Still under Filter type, choose “Advanced” from the list.
  7. New options are now displayed, enter the following in the three input fields:
    1. Field A -> Extract A: Choose ‘Campaign Source’ and type in ‘mail’.
    2. Field B -> Extract B: Choose ‘Campaign Medium’ and type in ‘referral’.
    3. Output To -> constructor: Choose ‘Campaign Source’ and type in ‘webmail’.
  8. Finally, in the last four options select:
    1. Field A Required: YES
    2. Field B Required: YES
    3. Override Output Field: YES
    4. Case Sensitive: NO
  9. Click ‘Save Changes’

For your convenient, here is a screenshot of how it should look:

Consolidate webmail filter configuration

Note that we set both “Field A Required”, “Field B Required” and “Override Output Field” to “Yes”. These settings are necessary in order for this filter to work properly. The first two settings ensure that we only change data for visits that fit the requirement we set in Fields A and B, while the third one ensures that all visits that meet the filter requirements will have their source overridden with “webmail”.

Once you’ve applied this filter to your reports, your email visits going forward will be consolidated into a single entry:

webmail / referral

If you look at your traffic sources by medium, you’ll notice that even after this filter, webmail traffic is still included with the rest of your referral traffic:

Google Analytics traffic medium

If you’re OK with this, that’s fine, but it is possible to separate your email traffic out by adding a second filter in addition to the first filter:

This is similar to our previous filter, but here we specify that we want to filter on visits with a source of “webmail” and change the medium of those visits to “webmail”. Filters build on each other, so it’s important that this filter come after the previous filter, otherwise it won’t find any visits with “webmail” as the source.

instructions

Separate webmail from referral filter configuration

After you make this change, your report on mediums should look more like the following:

Google Analytics traffic medium with separated webmail

This makes it much easier to differentiate between true site referrals and traffic that’s coming from email.

If you were wondering what is the difference between webmail and email, we tend to use the medium “email” for tagged emails (autoresponders, etc.), and “webmail” to identify untagged emails that we separated out from referrals. These can potentially have very different behavior: one is a formal email or newsletter that you sent to someone, and the other is a more informal email that they might have received from a friend, etc. This is just the naming convention we use, but you can use whatever naming convention makes the most sense to you.

Important Considerations

  1. It’s possible to use advanced filters to break out webmail traffic by source. That is, you could have yahoo / webmail, aol / webmail, etc. The filters for this are much more complicated, however, and you may have trouble finding a good reason for knowing that an email visit came from aol instead of yahoo. But if you decide you need help with this we can help you via one of our Google Analytics technical support plans.
  2. Getting a lot of webmail traffic may also be a sign that you aren’t properly tagging your emails. If these are emails that you are sending out, especially from some type of autoresponder, then you should consider tagging these in some way. For more information read the article How to properly tag emails.
  3. Filters only affect data going forward, so any existing data will still look as before. Also, sometimes the filter takes a little bit to kick in, so you may have a few hours worth of data that’s still not filtered correctly before it takes effect.

As always, feel free to ask questions in the comments about this topic or let us know if you found this technique useful and/or how you used it.

Do you need help with Google Analytics?
For customized help with your Google Analytics implementation or analysis, check out our Google Analytics Support Plans. Here at ROI Revolution, we consider Google Analytics tracking essential for paid search, so it’s included in our PPC Campaign Management service.

Posted in Analytics | Tagged , | Leave a comment