谷歌分析内容实验没有重定向没有访问者 [英] google analytics content experiment without redirect getting no visitors
问题描述
我已经实现了一个没有重定向的GA实验
< script type =text / javascript> _udn = 'example.com'; _uhash =关闭;< /脚本>
< script type =text / javascriptsrc =// 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);
})();
我似乎没有进行任何造访。
我遵循的说明在这里实验 - 客户端
b
我想知道是否使用 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';
这个解决方案并不是最优的,因为它阻止我获取人口统计数据,但我至少获得了实验数据现在。
I have implemented a GA experiment with no redirect
<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);
})();
I don't seem to get any visits. The instructions I followed are here experiments-client-side
I have followed the accepted answer at this similar question
Google still does not seem to be receiving my experiment visits.
I am wondering if it has something to do with using stats.g.doubleclick.net/dc.js instead of ga.js
Change the ga.src to ga.js experiments don't seem to work with stats.g.doubleclick.net/dc.js
ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
was changed to
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
This solution is not optimal since it stops me from getting demographic data but I am at least getting experiment data now.
这篇关于谷歌分析内容实验没有重定向没有访问者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!