- Timestamp:
- 08/05/08 21:36:03 (3 weeks ago)
- Files:
-
- trunk/Changes (modified) (1 diff)
- trunk/t/48_google_analytics.t (modified) (4 diffs)
- trunk/templates/footer.tt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Changes
r1197 r1203 22 22 Added a Universal Edit Link (http://universaleditbutton.org/) (#254) 23 23 Update references to http://openguides.org moved URLs 24 Update Google Analytics code to support new version (#255) 24 25 25 26 0.62 8 June 2008 trunk/t/48_google_analytics.t
r967 r1203 35 35 return_output => 1, 36 36 ); 37 unlike( $output, qr/ urchinTracker/, "Google analytics omitted by default" );37 unlike( $output, qr/ga.js/, "Google analytics omitted by default" ); 38 38 39 39 $config->google_analytics_key( "" ); … … 42 42 return_output => 1, 43 43 ); 44 unlike( $output, qr/ urchinTracker/, "...also if analytics key is blank" );44 unlike( $output, qr/ga.js/, "...also if analytics key is blank" ); 45 45 46 46 $config->google_analytics_key( 0 ); … … 49 49 return_output => 1, 50 50 ); 51 unlike( $output, qr/ urchinTracker/, "...also if analytics key is zero" );51 unlike( $output, qr/ga.js/, "...also if analytics key is zero" ); 52 52 53 53 $config->google_analytics_key( "ThisIsNotAKey" ); … … 56 56 return_output => 1, 57 57 ); 58 like( $output, qr/ urchinTracker/, "does show up if key is provided" );58 like( $output, qr/ga.js/, "does show up if key is provided" ); 59 59 like( $output, qr/ThisIsNotAKey/, "...correct key" ); trunk/templates/footer.tt
r1055 r1203 47 47 48 48 [% IF config.google_analytics_key %] 49 <script src="http://www.google-analytics.com/urchin.js" 50 type="text/javascript"> 49 <script type="text/javascript"> 50 var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); 51 document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); 51 52 </script> 53 52 54 <script type="text/javascript"> 53 _uacct = "[% CGI.escapeHTML( config.google_analytics_key ) %]";54 if ( typeof urchinTracker == 'function' ) urchinTracker();55 var pageTracker = _gat._getTracker("[% CGI.escapeHTML( config.google_analytics_key ) %]"); 56 pageTracker._trackPageview(); 55 57 </script> 56 58 [% END %]
