简体   繁体   English

Google Analytics(分析)跟踪iFrame

[英]Google Analytics track iFrames

I'm reading through the GA codex and I can't seem to figure out exactly what they are trying to explain. 我正在阅读GA Codex,但似乎无法弄清楚他们要解释什么。

The situation: I have a site where we do live streaming. 情况:我有一个现场直播的网站。 Simple pages with a player and chat or a twitter stream. 具有播放器和聊天或Twitter流的简单页面。 Nothing that complicated. 没什么复杂的。 So an example, ClientA orders a live stream I do the following: 例如,ClientA订购直播流,我执行以下操作:

1. create a client page: domain.com/clientA
    - landingspage with player and twitterstream and such
    - has a GA tracking code
2. domain.com/clientA/ec/
    - a page with only the player for iframe embedding purpose
    - also has a GA tracking code (same, for now)
3. domain.com/ec.php (or whatever)
    - a simple page with the iframe and some explanation
    - this is so they can embed the iFrame on their own site

The Problem I can't seem to track when domain.com/clientA/ec/ has been iFramed on a site. 当domain.com/clientA/ec/在网站上被iFrame锁定时,我似乎无法跟踪该问题 So in my understanding the trackingcode on domain.com/clientA and domain.com/clientA/ec/ should differ from each other right? 因此,以我的理解,domain.com / clientA和domain.com/clientA/ec/上的跟踪代码应该彼此不同吗?

Iv'e been reading up on this , but no luck so I thought maybe what I want is not possible without having control over the pages hosted on the other sites. Iv'e已经阅读了关于这个 ,但没有运气,所以我想也许我想要的东西是不可能的,而无需在主机上的其他网站的页面控制。 Initially I thought it would be no hassle to do so when an embedcode is present on the page that will be iFramed. 最初,我认为当将要嵌入iFrame的页面上存在嵌入代码时,这样做不会很麻烦。

So... could anybody explain in non Google english a bit better what is going on here? 那么...有人能用非谷歌英语更好地解释这里发生了什么吗? Don't get me wrong, Google does a pretty good job in codexing their stuff. 不要误会我的意思,Google在将其代码编码方面做得很好。 Sometimes I just can't see the Wood for the Trees. 有时候我就是看不见树木的树木。

__ __
regards, Paul 问候,保罗

Tracking content that has been iframed on another website aren't going to show you that websites statistics, it is just not how Analytics works. 跟踪已在另一个网站上进行格式化的内容不会向您显示该网站的统计信息,而仅仅是Analytics(分析)的工作方式。

The thing is, from what I can understand of your setup, is that you want to be able to see if content has been iframed, and see that webpages statistics from the iframed source? 从我对您的设置的了解中,您想了解的是内容是否已经过iframed,并且可以查看来自iframed来源的网页统计信息吗? Then no, you are out of luck. 那不,你真走运。

The statistics you're seeing are the interactions that has happened on YOUR webpage, where the tracking code is implemented. 您所看到的统计信息是您的网页上发生的互动,在该网页上已实现了跟踪代码。 For you to be able to see anything else other then your webpage, you'd have to have access to those other websites. 为了能够查看除网页之外的其他任何内容,您必须有权访问其他网站。

What cross-domain tracking does is basically the same thing you are trying to achieve, but it is the "wrong way around". 跨域跟踪所做的基本上与您要实现的目标相同,但这是“错误的解决方法”。 What you usually want to do with cross-domain tracking is to capture data on another domain but retain the visitor information from your own domain. 通常,跨域跟踪要做的是捕获另一个域上的数据,但保留来自您自己域中的访问者信息。 Usually, this involves a shopping website where they have their e-commerce on another servers webpage. 通常,这涉及一个购物网站,在该网站上他们的电子商务在另一个服务器网页上。 You'd then be able to set up the same tracking code on both those domains and then link them together through setAllowLinker , _link , and other syntaxes that are detailed on the page you referred to. 然后,您可以在这两个域上设置相同的跟踪代码,然后通过setAllowLinker_link和您所引用页面上详细介绍的其他语法将它们链接在一起。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM