Analytics Experiment Parser阻止错误

时间:2016-10-06 15:20:02

标签: google-analytics

我已尝试在我的某个网页上实施Google Analytics分析实验。我添加了以下代码:

<!-- Google Analytics Content Experiment code -->
<script>function utmx_section(){}function utmx(){}(function(){var 
k='122644017-3',d=document,l=d.location,c=d.cookie;
 if(l.search.indexOf('utm_expid='+k)>0)return; function f(n){if(c){var 
i=c.indexOf(n+'=');if(i>-1){var j=c. indexOf(';',i);return 
escape(c.substring(i+n.length+1,j<0?c. length:j))}}}var 
x=f('__utmx'),xx=f('__utmxx'),h=l.hash;d.write( '<sc'+'ript src="'+'http'+
(l.protocol=='https:'?'s://ssl': '://www')+'.google-
analytics.com/ga_exp.js?'+'utmxkey='+k+ '&utmx='+(x?x:'')+'&utmxx='+(xx?
xx:'')+'&utmxtime='+new Date(). valueOf()+
(h?'&utmxhash='+escape(h.substr(1)):'')+ '" type="text/javascript" 
charset="utf-8"><\/sc'+'ript>')})(); </script><script>utmx('url','A/B');
</script>
<!-- End of Google Analytics Content Experiment code -->

到头部,但我的控制台提供以下输出:

A Parser-blocking, cross-origin script, https://ssl.google-analytics.com/ga_exp.js?utmxkey=122644017-3&utmx=&utmxx=&utmxtime=1475762834841, is invoked via document.write. This may be blocked by the browser if the device has poor network connectivity. 
Failed to execute 'write' on 'Document': It isn't possible to write into a document from an asynchronously-loaded external script unless it is explicitly opened.

我试图谷歌这个错误,甚至在发布之前搜索这个地方,但我不知道为什么我收到这个。这里有没有人可以指出我正确的方向来解决这个问题?

0 个答案:

没有答案