Magento客户跟踪和开放式网站分析

时间:2012-08-13 14:03:24

标签: magento analytics customer

我正在尝试使用Open Web Analytics跟踪Magento安装上的用户。我已经正确安装了OWA并且它正在报告数据,但是用户仍然只是被分配了一个随机数来识别它们。我的代码如下。

var owa_baseUrl = 'http://my.analytics.url/';
var owa_cmds = owa_cmds || [];
owa_cmds.push(['setSiteId', '7232ed3eb582d3522c59b2337c520d39']);
owa_cmds.push(['trackPageView']);
owa_cmds.push(['trackClicks']);
owa_cmds.push(['trackDomStream']);
owa_cmds.push(['setCustomVar', '1', 'email', "<?=Mage::getSingleton('customer/session')->getCustomer()->getEmail(); ?>", "visitor"]);

var _owa = document.createElement('script'); _owa.type = 'text/javascript'; _owa.async = true;
owa_baseUrl = ('https:' == document.location.protocol ? window.owa_baseSecUrl || owa_baseUrl.replace(/http:/, 'https:') : owa_baseUrl );
_owa.src = owa_baseUrl + 'modules/base/js/owa.tracker-combined-min.js';
var _owa_s = document.getElementsByTagName('script')[0]; _owa_s.parentNode.insertBefore(_owa, _owa_s);

如您所见,我正在推送'setCustomVar'命令并发送电子邮件地址。这是正确的方法吗?

0 个答案:

没有答案