Google Analytics 会跟踪 window.location 和 Meta Refresh 吗? [英] Does Google Analytics track window.location and Meta Refresh?

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

问题描述

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

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?

这对我很重要,因为有广告服务器.我现在正在使用 window.location,而 Google Analytics(分析)和我的广告服务器有非常不同的静态数据.

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.

推荐答案

重定向有 3 种类型.谷歌分析对他们每个人都有不同的对待.但是,一个一致的线程是它查看值 document.referrer.因此,如有疑问,请检查.

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 重定向 (Location:...):Google Analytics 无法看到此重定向,因此如果用户从 A 转到 B,并且 B 触发 HTTP 重定向到 C,GoogleAnalytics 会将 A 视为推荐人.(例如,当用户通过 bit.ly 重定向时,点击的 bit.ly 链接永远不会被 bit.ly 跟踪为引用者).

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

META 刷新:Google Analytics 不会将此视为干净"重定向.因此,如果用户从 A 转到 B,并且 B 触发了指向 C 的 META 刷新重定向,则 Google Analytics(分析)会将 B 视为引荐来源.

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 不会将此视为干净"重定向.因此,如果用户从 A 转到 B,并且 B 触发 window.location 重定向到 C,Google Analytics 会将 B 视为引荐来源,但旧版本的 Internet Explorer 除外(它不会在 中列出引荐来源值)document.referrer 用于 JavaScript 重定向.)

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天全站免登陆