解析__utmz跟踪Cookie以获得引荐 [英] Parsing __utmz tracking cookie to get referral

查看:165
本文介绍了解析__utmz跟踪Cookie以获得引荐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的网站上使用Google Analytics(分析),我想读取__umtz Cookie以获得引荐链接。我做了一些研究,我写了这样的代码:

I use Google Analytics on my site, and I want to read __umtz cookie to get referring link. I made some research and I wrote such code:

$refer=explode('utmcsr=',$_COOKIE['__utmz']);
if(count($refer)>1) $refer=explode('|',$refer[1]);
$refer=addslashes($refer[0]);

我做错了什么?

推荐答案

转化大学帮助中有详细的说明 GA使用的Cookie的解析 __ umtz Cookie包含广告系列值,其中之一是 utmcsr (utm源) site - 将存储推荐来源。请记住,访问者会话其值不会更新

There is a detailed presentation at Conversion University Help describing the anatomy of the cookies used by GA. The __umtz cookie contains campaign values and one of those is utmcsr (utm source) that—when visitor comes from a referring site—will store the referral source. Keep it mind, that amongst the visitor session its value does not get updated.

这篇关于解析__utmz跟踪Cookie以获得引荐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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