0
我已经在我的网站下面的脚本自定义变量推到谷歌分析。但是,即使在5天后该数据不会出现在Analytics(分析)。任何人都可以注意到我在这里做错了吗?谷歌分析自定义变量脚本不工作
<!-- BEGIN GOOGLE ANALYTICS CODE -->
<script type="text/javascript">
//<![CDATA[
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
})();
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'xxxxxxxxxx']);
_gaq.push(['_trackPageview']);
_gaq.push(['_setCustomVar', 1, 'Product SKU','Test Data', 3]);
//]]>
</script>
<!-- END GOOGLE ANALYTICS CODE -->
附加信息:这剧本是从谷歌Analytis模块Magento的,我过的GA.php
所以我有以下脚本在我的网站现在是3天... ...但是,没有自定义变量已设置为谷歌分析:(,不知道什么真正发生, – Thanu
'VAR _gaq = _gaq || []; \t \t \t \t _gaq.push([ '_ setAccount', 'UA-XXXXXX-1']); _gaq.push([\ '_ setCustomVar \' 1,\ '产品SKU \',\ '测试数据\',3]); _gaq.push([ '_ trackPageview的']);' – Thanu
你为什么要逃避所有'代表你的字符串?这肯定会导致自定义变量行不推什么。 – carlsoja