If I redirect a user with w开发者_JS百科indow.location or Meta Refresh or header('Location:') from xxxy.com to yyyx.com, then Google Analytics will show xxxy.com as traffic source or not?
It's important for me because of an adserver. I'm using window.location right now, and Google Analytics and my ad server have very different statics.
There are 3 types of redirects. Google Analytics treats each of them differently. But, the one consistent thread is that it looks to the value document.referrer. So, when in doubt, just check.
HTTP Redirect (
Location:...): Google Analytics cannot see this redirect, so if a user goes from A to B, and B triggers an HTTP redirect to C, Google Analytics will see A as the referrer. (For example, clickedbit.lylinks never getbit.lytracked as the referrer when users get redirected throughbit.ly).META Refresh: Google Analytics will not see this as a "clean" redirect. So, if a user goes from A to B, and B triggers a META refresh redirect to C, Google Analytics will see B as the referrer.
window.location: Google Analytics will not see this as a "clean" redirect. So, if a user goes from A to B, and B triggers a window.location redirect to C, Google Analytics will see B as the referrer, except in older versions of Internet Explorer (which will not list a referrer value indocument.referrerfor JavaScript redirects.)
加载中,请稍侯......
精彩评论