开发者

Does Google Analytics track window.location and Meta Refresh?

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.

  1. 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, clicked bit.ly links never get bit.ly tracked as the referrer when users get redirected through bit.ly).

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

  3. 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 in document.referrer for JavaScript redirects.)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜