How Does Google Analytics Track Conversion Referrals?
November 10, 2006 by Justin CutroniVisitor campaign information is stored in a cookie on the visitor’s machine. This cookie stores the referral information for the visitor’s session. This cookie tracks organic referrals, tagged campaign links, un-tagged referral links and direct visits.
Each time a visitor visits your site the Google Analytics Tracking code updates this cookie with the appropriate campaign information. When the cookie is updated GA discards the previous campaign information. As a result GA only tracks the current campaign information, not previous campaign information.
With that said, there is a ‘pecking order’ regarding which activities will overwrite the the data in the campaign tracking cookie. Let’s review how GA buckets your traffic in terms of referral information:
- Campaigns: links that you have tagged with campaign information
- Referrals: untagged links on other web page
- Direct: people who type your URL into a browser
- Organic: organic search engine traffic
Here is how GA updates the campaign tracking cookie based on referrer:
- Direct traffic is always overwritten by referrals, organic and tagged campaigns
- New campaign, referral or organic link that brings a visitor to the site always overrides the existing campaign cookie
Here’s an example. A visitor visits your site from a newsletter with tagged links. They look around and decide to leave. When they leave your site the campaign tracking cookie will persist and indicate that they originated from the newsletter.
The same visitor decides to come back the next day and types your URL into the browser. The campaign cookie will still indicate that the visitor arrived via your newsletter because the second visit was a direct visit, and direct traffic does not overwrite existing campaign information.
With that all said, you can configure GA to NOT overwrite the campaign data that is stored in the tracking cookies. This let’s you identify the first campaign that brought the visitor to your site. Here is the link:
http://www.google.com/support/analytics/bin/answer.py?answer=27247
However, this technique does NOT prevent the Google Analytics Tracking Code from updating the campaign cookie if a visitor arrives by organic search or untagged referral link. This technique can only be used to prevent tagged campaign links from overwriting previous referral information from a tagged campaign link.
So how do you get around this? Well we’ve come up with a hack that we’re using with a few of our clients. The goal is to store all referral information about a specific visitor across all of their visits so we get a better understanding of the sales cycle.
The Google Analytics Tracking Code re-writes the data in the campaign tracking cookie every time the visitor hits the site. We need a mechanism that can store data across multiple sessions and would only update the referral data and not overwrite it. To do this we wrote some JavaScript that uses the custom segment functionality to track the visitor’s referral information.
Here’s a brief outline for what the JavaScript does:
- When visitor lands on the site check the previous referral information.
- If there is no previous referral info then gather the referral info and store it in a custom segment using utmSetVar()
- If there is previous referral info, then UPDATE the custom segment to include the current referral information
While this isn’t an ideal situation it does help. Using the User-defined report we can identify conversion rates for the various combinations of referral information that drove the visitor to your site during the sales cycle.
Obviously this takes some technical know-how. But if you’re working with a client, and the client wants to know EVERY step in the process then this is a hack that can help.
So there you have. Some information about how Google Analytics tracks referral information. I think there are two key things to remember.
- Not all referral information is created equal
- You can configure GA to let your campaign information persist
You may also be interested in the series I wrote about Campaign Tracking with Google Analytics:
Google Analytics Campaign Tracking Pt. 0: An Overview
Google Analytics Campaign Tracking Pt. 1: Link Tagging
Google Analytics Campaign Tracking Pt. 2: The EpikOne Link Tagging Tool
Google Analytics Campaign Tracking Pt. 3: Reports and Analysis
Thoughts? Questions? Leave a comment.
Subscribe:
