Changeset 1204
- Timestamp:
- Aug 8, 2008, 11:42:57 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Changes
r1203 r1204 23 23 Update references to http://openguides.org moved URLs 24 24 Update Google Analytics code to support new version (#255) 25 Some pages didn't properly include Google Analyatics; fix this (#257) 25 26 26 27 0.62 8 June 2008 -
trunk/t/48_google_analytics.t
r1203 r1204 11 11 } 12 12 13 plan tests => 5;13 plan tests => 9; 14 14 15 15 my ( $config, $guide, $wiki, $cookie, $output ); … … 58 58 like( $output, qr/ga.js/, "does show up if key is provided" ); 59 59 like( $output, qr/ThisIsNotAKey/, "...correct key" ); 60 # Make sure analytics stuff only shows up if we want it to on recent changes 61 # recent changes doesnt use CGI. which we dont need anymore but we should test in case we change our mind again. 62 63 $config->google_analytics_key( "" ); 64 $output = $guide->display_recent_changes( return_output => 1 ); 65 unlike( $output, qr/ga.js/, "...also if analytics key is blank" ); 66 67 $config->google_analytics_key( 0 ); 68 $output = $guide->display_recent_changes( return_output => 1 ); 69 unlike( $output, qr/ga.js/, "...also if analytics key is zero" ); 70 71 $config->google_analytics_key( "ThisIsNotAKey" ); 72 $output = $guide->display_recent_changes( return_output => 1 ); 73 like( $output, qr/ga.js/, "does show up if key is provided" ); 74 like( $output, qr/ThisIsNotAKey/, "...correct key" ); -
trunk/templates/footer.tt
r1203 r1204 53 53 54 54 <script type="text/javascript"> 55 var pageTracker = _gat._getTracker("[% CGI.escapeHTML( config.google_analytics_key )%]");55 var pageTracker = _gat._getTracker("[% config.google_analytics_key %]"); 56 56 pageTracker._trackPageview(); 57 57 </script>
Note: See TracChangeset
for help on using the changeset viewer.