非同期型、従来のタグでクロスドメイン

NO IMAGE

1.GAのタグは下記のように。
setDomainNameはnone、
setAllowLinkerはtrue
にする。

<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-xxxxxxxx-x']);
_gaq.push(['_setDomainName', 'none']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);

(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>

2.ドメインをまたぐリンクに、onclickでlinkを付ける
<a href="http://sample.com" onclick="_gaq.push(['_link', 'http://sample.com']); return false;">ドメインをまたぐリンク</a>

●参考サイト
Googleアナリティクスで複数ドメインのサイトを計測する方法|坊主社長のWebマーケティングブログ
【Google Analytics】(改訂版)クロスドメイン設定の最終形(非同期バージョン) | オフィス隆斎堂ブログ
ケース別クロスドメイン設定方法まとめ【ユニバーサルアナリティクス対応】 | Webコンサルティングのパワー・インタラクティブ
Web Analytics or Die » Blog Archive » Googleアナリティクス 複数ドメイン計測でのtaget=”_blank”

Google Analyticsカテゴリの最新記事