Newsletter Revenue Reporting With Urchin & Google Analytics

Are you using email newsletters to promote your store, but you don’t know if they are generating sales?  Both Google Analytics and Urchin support ecommerce tracking and provide reporting that show revenue generated by a “source” – such as a newsletter campaign.

In this article we’ll review how to use custom URLs to track visitors coming in from a newsletter and where to view the corresponding revenue report.  To use these method’s it’s expected that you already have Google Analytics or Urchin 6 with ecommerce tracking active on your website.

Urchin

Urchin6 supports a revenue source report named “User Defined”.  It uses a javascript variable that you can insert into the HTML code on the page to track the source:

<script type="text/javascript">
__utmSetVar("hardcoded on page");
</script>

In this example, the variable is set to “hardcoded on page”, which will be the value in our source report.  While this method will work in some cases, when sending newsletters you want to track the customers who click on a link in the newsletter – so setting the value in the HTML code of the page will not work correctly.

There is no built-in feature to pass the value in the URL, but with some additional javascript and a properly formatted URL the value can be passed and then accessed by javascript:

<script type="text/javascript">
functiongup( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  varregexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp(regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}<script type="text/javascript">// <![CDATA[
var utmSetVar_value = gup( 'utmSetVar' );
__utmSetVar(utmSetVar_value);
// ]]></script>
<script type="text/javascript">// <![CDATA[
mce:0
// ]]></script>

With the code above, and a URL like this:

http://www.yourdomainhere.com/urchintest.html?utmSetVar=fake_newsletter2

…a variable of “utmSetVar” is passed and its value is set in the URL.  With that method you could link to pages on your site through a newsletter and track the revenue generated to that source.

User Defined Revenue Report

In the screenshot here you’ll see data for 2 transactions that were placed upon accessing a page with the hardcoded javascript, and an additional transaction that was placed upon following a link with the value in the URL.

Google Analytics

With Google Analytics, source tracking through the URL is built-in and quite robust, as it supports multiple fields of values that you can pass on the URL.

There are 5 fields available for use in the URL when tracking through Google Analytics, with the more common ones being:

  • utm_source =  The name of your contact list
  • utm_medium = “email”
  • utm_campaign = The name of your newsletter

An example URL with those 3 values would be:

http://www.yourdomainhere.com/googletest.html?utm_source=Test_List&utm_medium=email&utm_campaign=My_Newsletter

With this example, we’re passing “Test_List” as our contact list name, “email” as the medium (since the user is coming in from an email we sent) and “My_Newsletter” as the campaign field since that’s the name of the newsletter we sent.

Google also supports a field named utm_content and another named utm_term for passing additional tracking details.  They have additional details and a URL builder to help create links here:

To view the reports in Google Analytics, you will click on Traffic Sources > Campaigns.  If you are using the new interface for Google Analytics click on Incoming Sources to see the Campaigns link.

By default the report will show Site Usage instead of Ecommerce, so you will want to click on Ecommerce to view the reports.

Check Your Newsletter Software
If you’re using an email marketing system, check the system to see if it has support for Google Analytics built-in.  Some of them do, and with a couple of mouse clicks you can configure the email system to automatically tag your links with the tracking  variables.

  • Note: If you’re hosting with LexiConn and using our new mailing list system, you will see an option named “Google Analytics Link Tracking” when editing a contact list.

It may take a few minutes to configure, and some extra work if you’re manually creating your links, but tracking your revenue back to the email the customer originally received will give you great insight on how your marketing strategies are helping to build your ecommerce business.

 

Looking for a web host that understands ecommerce and business hosting?
Check us out today!

Leave a Reply