我遇到了以下用于我的网站的 GA 代码,但我不太确定它在技术上是否正确。
我想要实现的是将 GA 信息发送到两个帐户xx-samplega-1和xx-samplega-2。
<script>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'xx-samplega-1']);
_gaq.push(['_trackPageview', '/ruby/appt_step1_page']);
_gaq.push(['_setAccount', 'xx-samplega-2']);
_gaq.push(['_trackPageview', '/ruby/appt_step1_page']);
_gaq.push(['_addOrganic', 'search.maxonline.com.sg', 'search']);
_gaq.push(['_addOrganic', 'fastbrowsersearch.com', 'q']);
_gaq.push(['_addOrganic', 'search.babylon.com', 'search']);
_gaq.push(['_addOrganic', 'search.maxonline.com.sg', 'q']);
_gaq.push(['_addOrganic', 'search.conduit.com', 'q']);
_gaq.push(['_addOrganic', 'search.esnips.com', 'searchQurey']);
_gaq.push(['_addOrganic', 'search.freecause.com', 'p']);
_gaq.push(['_addOrganic', 'search.goo.ne.jp', 'MT']);
_gaq.push(['_addOrganic', 'search.hp.my.aol.sg', 'query']);
_gaq.push(['_addOrganic', 'search.hiyo.com', 'q']);
_gaq.push(['_addOrganic', 'search.iminent.com', 'q']);
_gaq.push(['_addOrganic', 'search.mywebsearch.com', 'searchfor']);
_gaq.push(['_addOrganic', 'search.sweetim.com', 'q']);
_gaq.push(['_addOrganic', 'search.winamp.com', 'q']);
_gaq.push(['_addOrganic', 'search-results.com', 'q']);
_gaq.push(['_addOrganic', 'websearch.rakuten.co.jp', 'qt']);
(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>