• Home
  • Google Analytics
    • Customizations
    • For Ecommerce
  • Speaking
  • About
    • About Me
    • Contact Me
    • Disclaimer and Privacy Policy

Analytics Talk

Digital Analytics for Business

You are here: Home / About Google Analytics / How Does Google Analytics Track Conversion Referrals?

How Does Google Analytics Track Conversion Referrals?

Posted: November 10, 2006 51 Comments

Visitor 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.

  1. Not all referral information is created equal
  2. 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.

Filed Under: About Google Analytics, Campaign Tracking, Common Problems Tagged With: Analysis, Campaign Tracking, google-analytics, link-tagging, online-marketing

Comments

  1. Michael Reilly says

    January 19, 2007 at 12:17 am

    Using GA, I identified one of my highest referring sources was a direct competitor’s website. I’ve searched their entire site and I can’t find any links on their site that point to my site. (They don’t even do reciprocal linking so it can’t be there.) If another site has absolutely no links to my site, how is it that Google shows that site as a referring source? Does Google track the page you were on immediately prior to the page you visit when you type a direct URL in the browser? If this is the case, the only thing I can figure is that someone with the competitor’s website as their homepage is constantly visiting my site using a direct URL and not clicking a link. Please help me unravel this mystery. – Another Accenture alum

    Reply
  2. Peeter Marvet says

    February 21, 2007 at 6:58 am

    Michael – this is “referrer spam”, pretty much used for subjects you can also find in your email spam. Works for spammer if you make your referrer logs visible (like some weblog of free counters do, I have seen the robots check after spamming if their link appears in public log).

    I’ve seen IPs that have created up to million requests with various referrers… oops, make that “over million”: 216.40.250.26 has made 1 084 458 hits since I banned it a year ago or so.

    Reply
  3. Howard Portney says

    April 3, 2007 at 4:58 pm

    Hello,
    I had a quick question that I was hoping you may be able to answer. I am using Yahoo CPC and Google Analytics to track it. I used the URL Builder, and created tagged links for all keywords. They were all approved, but Google is not tacking any of the Yahoo CPC at all. Why might this be?

    Thank you for your time and help,
    Howard Portney

    Reply
  4. Justin says

    April 3, 2007 at 6:22 pm

    Hi Howard,

    If the values from tagged links are not appearing in your GA reports then there may be a problem with your site. When you click on one of your Yahoo! ads do you see the query string variables when you land on your site? If not, then your site is stripping off the variables or the site is doing a redirect. That’s the first ting I would check.

    Hope that helps,

    Justin

    Reply
  5. Howard Portney says

    April 4, 2007 at 9:06 am

    Hi Justin,

    I think you’re correct, because when I do a Yahoo search, and click on one of our Cost Per Click ads, I see the exact URL as if I typed it in myself (with no query string variables). I guess my question would be, how can I get my site to show the query string variables when clicking on the CPC ads?

    Thanks again,
    Howard

    Reply
  6. Justin says

    April 4, 2007 at 9:19 am

    Howard,

    That’s a pretty tough question to answer. It could be any number of things. You’re best bet is to talk to you IT staff.

    Justin

    Reply
  7. Howard Portney says

    April 4, 2007 at 9:33 am

    Hi Justin,

    That’s part of the problem – I AM the IT staff. LOL! Actually my supervisor noticed this yesterday too (the missing query string variables). I tried writing to GA, but they weren’t of much help. I also wrote to Yahoo Search Marketing, and I’m waiting for a response…

    Once again, thank you for your help. At least I know that I’m moving in the right direction now. Thanks again,
    Howard

    Reply
  8. Nick Guebhard says

    April 4, 2007 at 11:08 pm

    Hi

    Looking at the relationship between different referral sources and conversions has been of interest to me for a while.

    Where can I find the JavaScript that ensures Google Analytics only updates referrer information rather than overwrites it? Also, what effect does it have on reports? If different sources (eg, PPC and organic) are both being credited for a conversion, does this mean inflated conversion total reports? …and if not what report does one use in Google Analytics to see the conversion history through the different referrer sources?

    Look forward to your reply.

    Nick

    Reply
  9. Justin says

    April 5, 2007 at 7:32 am

    Hi Nick,

    The hack I described in the post uses the custom segmentation feature of Google Analytics to keep track of the all the marketing touch points in the sales process. The actual code needs to be custom developed by one of your developers.

    When it is implemented you can use the custom segment reports to evaluate which marketing materials influenced the customer.

    Good luck!

    Justin

    Reply
  10. Frank Dixon says

    July 6, 2007 at 11:03 am

    Hi,

    I’m an affiliate marketer.

    Is there any way to hack Google analytics in such a way to track affiliate sales down to the keyword level, like it can be done at keywordradar.com or xtreme conversions?

    Thanks.

    Reply
  11. Justin says

    July 9, 2007 at 10:32 am

    Hi Frank,

    I’m a little confused by your question. Are you looking to track the keywords that people used to find the sites that you’re trafficking ads on?

    Justin

    Reply
  12. Nat Colley says

    September 30, 2007 at 12:35 pm

    I’m new at this, so forgive me if this sounds naive or obvious, but it looks as if I don’t need affiliate software/programs if I am using Google Analytics? That as long as I know the right things to do, GA will give me all the benefits of an affiliate program without buying a new one and having to learn it? Is this right? Thx.

    Reply
  13. Justin says

    October 5, 2007 at 11:37 pm

    Hi Nat,

    Thanks for your question. I’d love to give you a definitive answer, but the real answer is, it depends. Google Analytics is a web analytics tools. It tracks how people got to your website and what they did while they were on your website. Google Analytics will also link a conversion back to where the visitor originated from. It sounds like that what you need.

    Justin

    Reply
  14. CCTV Camera Pro says

    October 12, 2007 at 6:37 am

    Thanks for this great article. It completely answered my question regarding how different referrers take precedence over each other. Do you happen to know how long the analytics tracking cookie persists. I did not see this information in the article or comments.

    Thanks!

    Reply
  15. Justin says

    October 17, 2007 at 9:45 am

    Hi CCTV Camera Pro,

    The cookies has different life spans, but they all expire within 2 years.

    Justin

    Reply
  16. Nilesh says

    October 18, 2007 at 4:49 pm

    I have a setup a campaign in GA for my newsletter. I have defined various source/medium combinations based on certain criterias.
    Suppose a user comes to my site by clicking on a link the page visit for that source medium combination will increase.
    Now if the same user comes to the same page by directly typing the url browser probably on some other day will there be an increment for that source/medium combination.

    Reply
  17. Justin says

    October 22, 2007 at 9:13 pm

    Hi Nilesh,

    Yes. If someone initially visits using a tagged link, and then visits the site directly, then GA will record 2 visits for the initial source/medium combination.

    Thanks for reading and thanks for the comment.

    Justin

    Reply
  18. Dave says

    October 23, 2007 at 4:16 am

    Nice article, I’m doing a bit of reverse engineering of urchin at the moment and stumbled across it while googling for more info :)

    Reply
  19. Leslie says

    October 24, 2007 at 10:17 am

    Hi Justin,

    Is there a way to get the conversion source to print on a contact form? Someone in a GA forum said I would need to parse out the source from the _utmz cookie and put it in a hidden form field.

    The web site and form are coldfusion. I’d don’t have a clue as to how this would be done. Any help is appreciated.

    I really learned a lot from your GA ebook – great job!

    Thanks – Leslie

    Reply
  20. Justin says

    October 25, 2007 at 2:51 pm

    Hi Leslie,

    The answer to your question is in the PDF! Check out the section on CRM integration. The same technique can be used to print a conversion source on a contact form.

    I’ll try to write a post about it soon.

    Justin

    Reply
  21. Leslie says

    October 29, 2007 at 3:52 pm

    Justin – that’s so awesome! I see it now! Thank you and if you do get to write about it that would be great too.

    Thanks again.
    Leslie

    Reply
  22. pere rovira says

    November 14, 2007 at 4:25 pm

    just wanted to say thanks for this great article that sort of saved my life :)

    thanks a lot!!!!

    Reply
  23. Charlie says

    November 28, 2007 at 1:02 pm

    Hi Justin-

    Do you know of any way of distinguishing bookmark visitors from direct type in visitors? It looks like they are group together under “Direct” and I’d like to separate out the prospects (New visitors) who are arriving via a bookmark from those that are typing in adsense.

    Is there a hack to do this?

    Thanks

    Reply
  24. Justin Cutroni says

    December 2, 2007 at 11:53 pm

    Hey Charlie,

    The only thing I can think of is to change the destination URL that is used for the bookmark. Unfortunately you don’t have much control over that unless you add a ‘bookmark this site’ link and tag the site URL with the campaign tracking parameters. That should work.

    Thanks for reading and let me know if that works for you.

    Justin

    Reply
  25. Medical Billing Services says

    December 7, 2007 at 7:45 pm

    Hi,

    We are currently using google analytics to track the visitors of our website. Just wanted to know what is GA using to track the countries of the visitors?

    Thanks,
    Cham

    Reply
  26. Justin Cutroni says

    December 7, 2007 at 10:23 pm

    Hi Cham,

    Yes, Google Analytics will identify a visitor’s country. GA does a reverse DNS lookup to map the visitor’s IP address to a geographic location. While it is not 100% accurate it does a pretty good job.

    Thanks for the comment.

    Justin

    Reply
  27. Dana says

    December 13, 2007 at 12:34 pm

    Hi Justin,

    A very helpful page. I hope you can help with this… it may be a very basic question to many, but I have been unable to find the answer. I realize that “direct” means typing a URL into the browser directly, but what about if someone forwards an email with a link? If someone clicks on that link, does that count as a direct source or a referral as far as Google Analytics is concerned?

    Reply
  28. Justin Cutroni says

    December 13, 2007 at 7:48 pm

    Hi Dana,

    It depends. :) If the link in the email was tagged with the utm_ parameters, then the visitor will be bucketed according to the values in the link tags. If the link has not been tagged then the visitor will show up as a referral, if they use a web-based email client (like GMail). Or, if they use a regular email application (like Outlook) and the link has not been tagged, they will show up as a direct visit.

    Thanks for reading and I hope that helps!

    Justin

    Reply
  29. Tshwarelo says

    February 8, 2008 at 3:16 am

    What techniques does Google Analytics use to track new users? Is it perhaps through using cookies or IP addresses?

    Reply
  30. Suzuki says

    June 16, 2008 at 1:14 pm

    Hi Justin,

    I am wondering whether it is possible to track the user “action” of clicking on an email (mailto:xxx) embedded in the site?

    Thanks,
    Suzuki

    Reply
  31. Justin Cutroni says

    June 25, 2008 at 6:35 am

    Hi Tshwarelo,

    GA uses a first party cookie to identify new visitors. Those that do not have a cookie are identified as a new visitor, those with a cookie are identified as a returning visitor.

    Hope that helps,

    Justin

    Reply
  32. Jeff says

    June 29, 2008 at 3:21 pm

    HI Justin,
    Great content here as always. Perhaps you can offer assistance on the following.
    In my GA account under Traffic Sources->Keywords with the Ecommerce Tab selected, I don’t see any transactions at all linked to the referring keywords?

    In most cases I see the referring keyword that brought the sale to my site in my shopping cart’s new order emails, “order trail” but when checking that keyword in GA, no conversions are attributed to that keyword.

    I think it’s because while on the site users are at http://www.mydomain.com, but once they enter checkout the url becomes https://secure1.make-a-store.com/cgi-bin/domain/Make-a-Store.cgi….etc.
    So they are breaking the initial session that came from that keyword/domain, so it doesn’t carry over into a “conversion” in GA.

    I’n not quite certain which of the following Google recommendations to implement in this case, per the help docs? cart:http://www.google.com/support/analytics/bin/answer.py?answer=55532&ctx=sibling

    Any help would be appreciated, Jeff :)

    Reply
  33. Justin Cutroni says

    June 30, 2008 at 7:01 am

    Hi Jeff,

    The GA help center article you reference is correct:

    http://www.google.com/support/analytics/bin/answer.py?answer=55532&ctx=sibling

    You want to configure GA for a 3rd party shopping setup. We also call this cross domain tracking. It’s a way to track visitors across multiple domains.

    Be aware that not all shopping cart providers let you configure this setup.

    Thanks for the question and best of luck,

    Justin

    Reply
  34. Justin Cutroni says

    July 3, 2008 at 8:36 am

    Hi Suzuki,

    Yes, you can track clicks on a Mail link in Google ANalytics. The key is to create a pageview when the visitor clicks on the link, and then use that pageview as a goal. You can read more about tracking clicks with GA in this series of posts. Also check out this post about GA goals.

    Hope that helps,

    Justin

    Reply
  35. Will says

    July 22, 2008 at 6:02 pm

    Great info, great site Justin. I also have a question. Currently I have configured my GA set up to be linked to my Adwords account. As such, Adwords is currently being reported as “google/cpc” in GA. Is there a way of changing it to something like “google/cpc – campaign” without disabling auto-tagging?

    Reply
  36. Justin Cutroni says

    July 25, 2008 at 9:04 pm

    Hi Will,

    You can change the way your data appears without disabling auto-tagging. You’ll need to create a new profile and add a filter to the new profile. The filter should concatenate the campaign, medium and source information. If you’ve never dabbled in advanced filters it can be a bit confusing. Here are a couple of screen shots to help out:

    GA filter #1 for adding camapign data.

    GA Filter #2 for adding campaign data.

    Remeber, make sure you create a new profile and add these filters to the new profile. You’ll find the data in the Traffic Sources > Campaigns report.

    Thanks for the question,

    Justin

    Reply
  37. Abhishek Singh says

    August 5, 2008 at 12:21 am

    HI Justin,
    i have to get a internal search report in GA but the problem is that te portal we are using does not uses query string but uses session variable.can i get a repaort in this case.

    Thanks a lot in advance.

    Reply
  38. Justin Cutroni says

    August 11, 2008 at 9:15 am

    Hi Abhishek,

    In order to solve your problem you need to create a virtual pageview that contains a query string parameter for the internal site search term.

    Check out this post that I wrote about tracking visitor clicks using GA.

    Thanks for the question,

    Justin

    Reply
  39. Vanessa says

    March 23, 2009 at 3:44 pm

    Is it possible to get time/date details on when someone clicked a referral link to our site? I get that it tracks how many clicks, but cannot seem to drill down as to when those clicks are happening.

    Reply
  40. Rhonda says

    April 14, 2009 at 12:47 pm

    Is there any way to track the conversion delay through Google Analytics? i.e. track how long it takes for each paid search lead to convert from the moment they first clicked on the ad, based on the cookie window.

    Reply
  41. Justin Cutroni says

    April 16, 2009 at 3:08 pm

    Rhonda,

    Due to the campaign attribution model that GA uses, it’s very difficult to track the original referrer (meaning the very first click that brought the visitor to the site).

    If you’re looking for how long it takes people to convert, you actually need to use e-commerce tracking. GA will only measure conversion latency, i.e. how many visits, or how many days, it takes someone to convert.

    Check out this post on using GA for non-commerce sites

    Hope that helps.

    Justin

    Reply
  42. Justin Cutroni says

    April 16, 2009 at 4:20 pm

    Vanessa,

    You can track when people visit your site. So you equate a click to a visit, which is not 100% accurate but fairly close. Use the Visitors > Visitor Trending reports. You’ll notice a time of date view under the date range selection tool.

    Hope that helps,

    Justin

    Reply

Trackbacks

  1. Analytics Talk » Google Analytics Campaign Tracking Pt. 1: Link Tagging says:
    November 10, 2006 at 11:42 am

    […] It’s important to understand that the cookie will persist until 2038. It’s also important to understand that the cookie will be updated with other information. For details about how Google Analytics stores various referral information please see the following post: How Does Google Analytics Track Conversion Referrals? […]

    Reply
  2. this just in » How Does Google Analytics Track Conversion Referrals? says:
    November 11, 2006 at 3:37 am

    […] How Does Google Analytics Track Conversion Referrals? […]

    Reply
  3. 30 seconds to Tambu » Blog Archive » Come Google Analytics traccia la conversione dei referral says:
    November 27, 2006 at 7:07 am

    […] [libera traduzione e adattamento di una parte del post “How Does Google Analytics track Conversion referrals” su Analytic Talk] […]

    Reply
  4. Library Analytics (Part 3) « OUseful.Info, the blog… says:
    August 22, 2008 at 3:38 pm

    […] And finally, to wrap this part up, it’s worth being sceptical no matter what precautions you put in place when trying to interpret the results; for example: How Does Google Analytics Track Conversion Referrals?. Possibly related posts: (automatically generated)Library Analytics (Part 2)Trial Databases – “Test drive” a databaseFind a Database by subjectLibrary Databases Temporarily Unavailable […]

    Reply
  5. Søgeoptimering af Jesper Jørgensen» Blogarkiv » Kampagne cookie - Google Analytics says:
    April 24, 2009 at 6:38 am

    […] http://www.epikone.com/blog/2006/11/10/how-does-google-analytics-track-conversion-referals/  […]

    Reply
  6. Analytics Talk » Blog Archive » Google Analytics Campaign Tracking Pt. 1: Link Tagging « Real Life Hitch says:
    December 15, 2009 at 2:31 pm

    […] It’s important to understand that the cookie will persist until 2038. It’s also important to understand that the cookie will be updated with other information. For details about how Google Analytics stores various referral information please see the following post: How Does Google Analytics Track Conversion Referrals? […]

    Reply
  7. Marketing» Blog Archive » Google Analytics: Visitor Life Time Value says:
    June 22, 2010 at 6:55 pm

    […] If you need to create custom URLs for more than 1 source, you might want to consider using this spreadsheet set up by Epikone. […]

    Reply
  8. Part 4: Search Engine Optimisation (SEO) | : JRC says:
    December 7, 2011 at 4:15 am

    […] Analytics to see which search engine refers the highest percentage of your customers (known as referrals) In the general population, the most frequently used search engine is currently Google, so I always […]

    Reply
  9. google-analytics-campaign-tracking-pt-1-link-tagging - EpikOne says:
    January 24, 2014 at 11:23 am

    […] It’s important to understand that the cookie will persist until 2038. It’s also important to understand that the cookie will be updated with other information. For details about how Google Analytics stores various referral information please see the following post: How Does Google Analytics Track Conversion Referrals? […]

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

My Books

Google Analytics by Justin Cutroni
Learn More on Amazon.com

Performance Marketing co-authored by Justin Cutroni
Learn More on Amazon.com

Recent Posts

  • Understanding the Google Analytics Cohort Report
  • Using Offline and Online data to drive Google Analytics Remarketing
  • Understanding Cross Device Measurement and the User-ID
  • Universal Analytics: Now out of beta!
  • Advanced Content Tracking with Universal Analytics

Categories

  • About Google Analytics (25)
  • Analysis (52)
  • Analytics Strategy (3)
  • Campaign Tracking (14)
  • Ecommerce (8)
  • Event Tracking (10)
  • Remarketing (2)
  • Reporting (10)
  • Resources (7)
  • Tag Management (5)
  • Tips (25)
  • Tracking (52)
  • Uncategorized (64)
  • Universal Analytics (9)
  • Web Analytics (15)

Copyright © 2023 ·News Pro Theme · Genesis Framework by StudioPress · WordPress