Google Analytics(分析)是否会跟踪window.location和Meta Refresh? [英] Does Google Analytics track window.location and Meta Refresh?

查看:119
本文介绍了Google Analytics(分析)是否会跟踪window.location和Meta Refresh?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我使用 window.location 或Meta Refresh或标题('Location:')将用户重定向到xxxy.com改为yyyx.com,那么Google Analytics会将xxxy.com显示为流量来源?



由于广告服务器的原因,这对我很重要。我现在正在使用 window.location ,Google Analytics和我的广告服务器有着非常不同的静态信息。

解决方案

有3种类型的重定向。 Google Analytics会以不同方式处理它们中的每一个。但是,一个一致的线程是它看起来值 document.referrer 。所以,如果有疑问,请检查。


  1. HTTP重定向(位置:...

    code>):Google Analytics无法看到此重定向,因此如果用户从A转到B,并且B触发了HTTP重定向到C,则Google Analytics会将A指定为引荐来源。 (例如,当用户被重定向到时,点击 bit.ly 链接永远不会获得 bit.ly code> bit.ly )。 META Refresh:Google Analytics不会将此视为干净重定向。因此,如果用户从A转到B,并且B触发META刷新重定向到C,则Google Analytics会将B作为引荐来源。
  2. c $ c> window.location :Google Analytics不会将其视为干净重定向。因此,如果用户从A转到B,B触发window.location重定向到C,那么Google Analytics会将B视为引荐来源,但Internet Explorer的旧版本除外(它不会在<$ c中列出引荐来源的值$ c> document.referrer for JavaScript redirects。)


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

这篇关于Google Analytics(分析)是否会跟踪window.location和Meta Refresh?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆