[TYPO3-english] how to include google analytics

Christopher Lörken christopher at loerken.net
Thu Feb 12 22:13:55 CET 2009

Francois Suter schrieb:

> Using an extension is not absolutely necessary and TS content can also 
> come at the end of the body if defined correctly (other examples can be 
> found in this mailing list).

I am using this snippet at the end of my template:

page.40 = HTML
page.40.value (
<script type="text/javascript">
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 type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-XXXXXX-X");
} catch(err) {}</script>


More information about the TYPO3-english mailing list