我想知道我是否以正确的方式构建了这个谷歌分析查询。我不确定'utmcc' - Part。
0 => string 'http://www.google-analytics.com/__utm.gif?utmwv=4.5.7' (length=53)
1 => string 'utmn=738025229' (length=14)
2 => string 'utmhn=www.mydomain.de' (length=15)
3 => string 'utmcs=ISO-8859-1' (length=16)
4 => string 'utmul=de-de' (length=11)
5 => string 'utme=8%28myvariable%299%28myvalue%2911%283%29' (length=45)
6 => string 'utmdt=Homepage' (length=14)
7 => string 'utmhid=985698389' (length=16)
8 => string 'utmp=home%2F' (length=12)
9 => string 'utmac=UA-XXX-6' (length=17)
10 => string 'utmcc=__utma%253D53343838.1730805896.1287423837.1287423837.1287423837.1%253B%252B__utmz%253D53343838.1287423837.1.1.utmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%253B' (length=188)
答案 0 :(得分:0)
对我来说看起来是对的,你是按照用户生成的吗?如果您为每个人使用相同的cookie字符串,您将在分析中获得一些意想不到的结果。
仅供参考,这是我在生产环境中使用的静态方法,用于生成字符串:
public static function generate()
{
$cookie = rand(1000000000,9999999999);
$random = rand(1000000000,2147483647);
$visitorId = mt_rand(1147483647,2147483647);
$today = time();
return '__utma=' . $cookie . '.' . $visitorId . '.' . $random . '.' . $today . '.' . $today . '.1;+__utmz=1.'
. $today . '.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none);';
}