因此,在阅读了有关如何继续的Google帮助文档后,我们必须更改此代码:
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
对此:
ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
我们的代码目前说这个(在现代化程序javascript加载之前):
<script>
window._gaq = [['_setAccount','UA-XXXXX-XX'],['_trackPageview'],['_trackPageLoadTime']];
Modernizr.load({
load: ('https:' == location.protocol ? '//ssl' : '//www') + '.google-analytics.com/ga.js'
});
</script>
我不确定如何修改我们的代码。我假设我们只需将其更改为:
load: ('https:' == location.protocol ? 'https://' : 'http://’) + 'stats.g.doubleclick.net/dc.js'
或者它会是这样吗?
load: ('https:' == location.protocol ?-Empty Quotes here or Nothing-) + 'stats.g.doubleclick.net/dc.js'