我正在尝试通过使用google analytics for mobile的JSP版本在web服务器的移动端设置对事件的服务器端跟踪
我尝试使用utme参数来跟踪确定的事件,但是我在一天后检查Analytics结果页面,我没有看到预期的事件(我自己触发了它们,所以这不是问题),即使我看到导航的跟踪似乎像预期的那样工作。
我知道这个参数不会显式地出现在手机参数列表中,但它确实会出现在参数的complete list中,这是从手机页面链接起来的一个引用。
长话短说: Google Analytics的移动(JSP)版本是否支持utme参数的使用?
发布于 2012-05-11 17:35:43
目前在google analytics for mobile实现中不支持utme参数。但是,您可以使用此项目:
http://code.google.com/p/serversidegoogleanalytics/
它支持事件,非常简单,适用于php 5.2
此项目的示例实现如下所示:
<?php
/**
* SSGA example
*/
include("ssga.class.php");
$ga = new Elements_Tools_Serversideanalytics();
$ga->setAccountId("UA-123456789-1");
$ga->setCharset("UTF-8");
$ga->setHostName("localhost");
$ga->setLanguage("en");
$ga->setPageTitle("SSGA example");
$ga->setPageView("/index.php");
/**
* Send events
*/
$ga->setEvent("Test", "iPad", "12345433454323", "124");
$ga->createEvent();
$ga->setEvent("Another Test", "iPad", "12345433454323", "21");
$ga->createEvent();
?>这里还有一个更完整的项目,它需要php 5.3:
https://stackoverflow.com/questions/7292455
复制相似问题