Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Item1159: recode using template overlay and place at end of document …
…(very important for perceived speed) git-svn-id: http://svn.foswiki.org/trunk/GoogleAnalyticsPlugin@2755 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
- Loading branch information
WillNorris
authored and
WillNorris
committed
Feb 27, 2009
1 parent
f7bce54
commit 6851463
Showing
3 changed files
with
32 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
%{ This is a Google Analytics template }%%TMPL:INCLUDE{"foswiki"}% | ||
|
||
%TMPL:DEF{"googleanalytics"}%\ | ||
<!-- GOOGLEANALYTICSPLUGIN --> <!-- Google Analytics script --> | ||
<script type="text/javascript"> | ||
// <![CDATA[ | ||
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); | ||
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); | ||
</script> | ||
<script type="text/javascript"> | ||
try { | ||
var pageTracker = _gat._getTracker("%GOOGLESITEKEY%"); | ||
pageTracker._trackPageview(); | ||
} catch(err) {} | ||
// ]]> | ||
</script> %TMPL:END% | ||
|
||
%TMPL:DEF{"bodyend"}% | ||
</div><!--/foswikiPage--> | ||
xxx | ||
%TMPL:P{"googleanalytics"}% | ||
</body></html> %TMPL:END% |