我已经实施了一个没有重定向的 GA 实验
<script type="text/javascript">_udn = 'example.com'; _uhash='off';</script>
<script type="text/javascript" src="//www.google-analytics.com/cx/api.js?experiment=ExperimentID"></script>
<script type="text/javascript">var chosenVariation = cxApi.chooseVariation();</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'AccountID']);
_gaq.push(['_setDomainName', 'example.com']);
_gaq.push(['_setAllowHash', false]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
我似乎没有收到任何访问。
我遵循的说明在这里实验客户端 https://developers.google.com/analytics/solutions/experiments-client-side
我已遵循此接受的答案类似的问题 https://stackoverflow.com/questions/11537051/why-arent-results-from-google-analytics-content-experiments-showing
谷歌似乎仍然没有收到我的实验访问。
我想知道这是否与使用有关stats.g.doubleclick.net/dc.js代替ga.js
将 ga.src 更改为 ga.js 实验似乎不适用于 stats.g.doubleclick.net/dc.js
ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
被改为
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
这个解决方案不是最佳的,因为它阻止我获取人口统计数据,但我现在至少可以获取实验数据。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)