1

Facebook ページからニュースレターのタブを追跡したい。このコードをサイトのソース コードに挿入しました。

<head>

<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXX-X']);
_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>

 </head>
 <body>

    <script type="text/javascript">
           var fb_param = {};
           fb_param.pixel_id = 'xxxxxxxxxx';
           fb_param.value = '0.00';
           (function(){
             var fpw = document.createElement('script');
             fpw.async = true;
             fpw.src = (location.protocol=='http:'?'http':'https')+'://connect.facebook.net/en_US/fp.js';
             var ref = document.getElementsByTagName('script')[0];
             ref.parentNode.insertBefore(fpw, ref);
           })();
   </script>

   <noscript>
        <img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/offsite_event.php?id=xxxxxxxxx&amp;value=0" />
   </noscript>


 </body>

十分ですか?

4

1 に答える 1

1

ソースに Google コードがある限り、Google は紹介を自動的に追跡します。Facebook ページに埋め込まれたリンクを変更できる場合は、URL に _utm 変数を追加することを検討してください。Google は URL からこれを自動的に認識し、GA アカウント内のこれらのパラメーターに追加します。_utm 変数の詳細を作成または取得するには、https ://support.google.com/analytics/answer/1033863 にアクセスしてください。

utm_source を facebook に、utm_medium を Newsletter-tab に設定します。

http://www.example.com/?utm_source=facebook&utm_medium=newsletter-tab
于 2013-08-25T17:19:56.470 に答える