Changeset 7964

Show
Ignore:
Timestamp:
03/15/08 10:13:49 (16 months ago)
Author:
hsbt
Message:

platform/tdiary/plugin/google_analytics.rb: support new tracking code.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • platform/tdiary/plugin/google_analytics.rb

    r4634 r7964  
    1212        return '' unless @conf['google_analytics.profile'] 
    1313        <<-HTML 
    14         <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> 
     14        <script type="text/javascript"> 
     15        var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.") ; 
     16        document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")) ; 
    1517        </script> 
    1618        <script type="text/javascript"> 
    17         _uacct = "UA-#{h @conf['google_analytics.profile']}"; 
    18         urchinTracker(); 
     19        var pageTracker = _gat._getTracker("UA-#{h @conf['google_analytics.profile']}"); 
     20        pageTracker._initData(); 
     21        pageTracker._trackPageview(); 
    1922        </script> 
    2023        HTML