2011-03-02 61 views

回答

7

_setDetectTitle對我來說工作得很好。你只需要在_trackPageview調用之前調用它:

var _gaq=_gaq||[]; 
    _gaq.push(['_setAccount','UA-XXXXXX-1']); 
    _gaq.push(['_setDetectTitle', false]);  
    _gaq.push(['_trackPageview']) 

您可以對比在version with _setDetectTitle set to false發送將__utm.gif命中,與sent in a standard version

在前者中,utmdt沒有設置,在後者中,它是。

屏幕截圖:左邊的一個發送頁面標題;在右邊的那個沒有。

Sends the page title Doesn't send the page title

2

,當我嘗試它的正常工作。以下是我正在使用的代碼:

<script type="text/javascript"> 
     var _gaq = _gaq || []; 
     _gaq.push(['_setAccount', 'UA-XXXXXXX-X']); 
     _gaq.push(['_setDetectTitle', false]); 
     _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> 
相關問題