开发者

google analytics not logging refer ~ have i done something wrong?

probably something simple

how do i get google analytics to detect traffic that comes from a website that redirects to another?

i.e

someone visits www.abc.com, and are redirected to another site

<?php header("Location:www.cde.com"); ?>

how do i track these hits? nothing comes up..as i guess it's not strictly a "referrer".

hope this makes sense..thanks

or is there a better way to do this? I want to track hits on anyone visiting d开发者_运维知识库omain X, which redirects to another site. Essentially we are doing a radio campaign with this new domain and would like to measure its effectiveness.

thanks


Most browsers don't pass the original referrer through a 302 redirect, so it's not available for Google Analytics to report on. Apparently if you set a 301 status code before the Location then it will work as expected (the php documentation isn't clear on what happens if you set the status code in the third param of the header function).

It might be worth setting up GA campaign tracking on this link, check out the GA docs.


The following resource explains how to do this correctly. Scroll to the bottom to see the "Correct serverside redirect":

http://code.google.com/p/ga-demos/wiki/GaRedirects

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜