Does Google Analytics track [removed] and Meta Refresh?

前端 未结 1 1986
渐次进展
渐次进展 2021-01-24 16:29

If I redirect a user with window.location or Meta Refresh or header(\'Location:\') from xxxy.com to yyyx.com, then Google Analytics will show xxxy.com

相关标签:
1条回答
  • 2021-01-24 16:58

    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 讨论(0)
提交回复
热议问题