Mar 15, 2009

Google Analytics: Does 301/302 Redirect Preserve Referrer Information?

In case you’re wondering whether 301 redirects preserve the referrer information or not and how this may affect Google Analytic’s referrer information, I’ll show you a simple example.

So pretty much what I did was I did a Google search for clothes and found some ads on the right hand side. I used firebug to extract the destination URL as I didn’t want to inflate their costs because I’m just doing an example. What I look for are obvious tracking URLs that track and monitor search engine marketing (SEM) campaigns such as DART (Double Click).

You can also figure this one out by seeing the domain of the URL. If this is different to the display URL, most likely this is a tracking URL because Google Adwords has enforced the policy that the destination and display URL must be the same (it’s ok to use tracking URLs though as long as you land on the same domain as the display URL).

clothes-adwords

So the URL I found was http://tsw0.com/2625/38659 . By typing this directly to your browser address bar, you’ll see that the referrer is empty (otherwise direct).

referrer1

Using firebug, you’ll see that the referrer information is empty. This will be registered as direct in Google Analytics. Now when I actually click on the ad,

referrer2

you’ll see that the referrer information shows my search for clothes on Google AU. This will be registered as google/organic in Google Analytics.

Tags: , , , , ,

6 Comments

  • i wanted to know what if a visitor visit my site A.com via search engine, for example search for testing and found my website A.com, and i i301 redirect the A.com to B.com, and i have google analytics setup on B.com, what will GA shows me about this? It is search engine traffic or referring site?

    • Hey Jack

      I believe if it’s a server-side redirect, it will retain the original referrer information which means you should look under search engine traffic. However, if you’re using client side redirect (i.e. javascript, meta refresh), I believe it will consider that as a referral traffic and you will lose the original referrer information.

  • The above example only applies to Analytics that are tied to AdWords.

    If abc.com links to xyz.com/page1 but xyz.com has htaccess redirects in place to forward page1 to page2, does Analytics think the referrer is xyz.com/page1 or abc.com?

  • So which page had a 301 redirect, this doesn’t really answer the question posed? If I have a non-indexed page (used solely as a landing page for advertising) which uses a 301 redirect, will Google Analytics see the referrer information when the redirected page loads?

    • If you actually followed the tsw0.com link, you’ll see the URL redirects to the net-a-porter.com. Google Analytics doesn’t capture the 301 referrer as the actual referrer. Instead it captures the original referrer that went to the 301 redirect URL.

      Original referrer -> 301 referrer -> Landing page.

  • So bottomline, referer information is available when doing a 301?

Leave a comment

Twitter Updates