なぜ使用する必要があるのですか:
(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';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
それ以外の:
<script async="true" type="text/javascript" src="http://www.google-analytics.com/ga.js"></script>
私が見ることができる唯一の理由は、SSL用に異なるサブドメインを持っているということです。そうでなければ、このスクリプトインジェクション手法を使用する理由はありますか?