Google Analytics(分析):如何跟踪移动网站的点击数作为主要网站的点击量 [英] Google Analytics: How to track hits to mobile site as hits to main site

查看:188
本文介绍了Google Analytics(分析):如何跟踪移动网站的点击数作为主要网站的点击量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在开发一个全新的我们网站的移动版本,它是一个使用Sencha Touch 2(Ext JS,JavaScript)编写的HTML5网站。 我们正在使用我们的主要网站上的Google Analytics(分析),我们也希望在移动网站上使用Google Analytics(分析)。不过,我们期望的使用案例有点特别:
我们希望将移动网站上的文章的点击次数作为主要网站上相应文章的点击量进行跟踪。
这背后的推理是希望汇总统计信息,而不是单独跟踪数据。

两个站点的域和URL结构不同,尽管站点层次结构有点类似(他们都从Sharepoint后端获得内容),这里就是挑战。我们不仅可以使用类似'setDomainName'的方式来更改域名。



在移动版本的每个页面上,我们都提供了原始页面/文章的完整URL主站点。我们想要做的就是告诉Google将该视图作为该网址的点击来访问,而不是我们实际访问的网址。



我看过一些主题(f前这里)关于'trackPageView',这可能已经足够满足我们的需求,但我不完全确定。这听起来有些简单,但也可能是我在这里看不到明显的解决方案。
我们可以提供这种方法所需的命中网址,就是这样吗?如果它不工作,那么在头文件中使用一个脚本来检查带有该URL的设置变量,如果它存在,则以它作为参数调用trackPageView,如果不是只追踪常规命中?
任何有关这种方法的语法帮助都是值得欢迎的。



所有帮助&建议在这里赞赏!
我在搜索GA文档时没有太多帮助有关这种特殊情况的信息。

解决方案

是的,就是这么简单的使用轨道页面查看事件并传递相应的URL参数。在sencha中,所有视图都将存在于同一个HTML页面中,因此您需要以编程方式调用该视图。



包含与您在实时站点中使用的跟踪代码相同的跟踪代码相同的ID ...这应该像你期望的那样工作...
非常好的问题...希望它有帮助...


We are developing a completely new mobile version of our site, it is a HTML5 site written using Sencha Touch 2 (Ext JS, JavaScript).

We are using Google Analytics on our main site, and we would like to use GA on the mobile site as well. However our desired use case is a little special: We would like hits to articles on the mobile site to be tracked as hits to the corresponding article on the main site. The reasoning behind this is the desire to aggregate the statistics, and not have the data tracked separately.

The domains and URL structure is different for the two sites, although the site hierarchy is somewhat similar (they both get content from a Sharepoint backend), and herein lies the challenge. We cannot only change the domain using something like 'setDomainName'.

On every page in the mobile version, we have available the full URL to the original page/article on the main site. What we would like to do is tell Google to track the view as a hit to that URL instead of the one we are actually on.

I've seen some threads (f ex here) regarding 'trackPageView' and it may be sufficient for our needs, however I am not entirely sure. It sounds a little too simple, but it may also be that I am not seeing the obvious solution here. Could we provide this method with the desired hit URL and that's it? Would it work then to have a script in the header that checks for a set variable with this URL, and if it exists call 'trackPageView' with it as a parameter, if not just track a regular hit? Any help with syntax for this approach is welcome.

All help & suggestions appreciated here! I've scoured GA docs without much helping information on this special case.

解决方案

Yes it is that simple use the track page view event and pass the corresponding URL parameters. In sencha all your views are going to exist in the same HTML page so you need to call this programmatically.

Include the same tracking code as you use in your live site with the same ID... This should work as you expect... Very good question...Hope it helps...

这篇关于Google Analytics(分析):如何跟踪移动网站的点击数作为主要网站的点击量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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