Is any way can add code for Google analytics?
Community
Web-Empowered Church User Community
Total Posts: 3 - Pages (1): [1]
If you look in the TYPO3 Extension Repository at http://typo3.org/extensions/repository/?tx_terfe_pi1%5Bview%5D=search&no_cache=1&tx_terfe_pi1%5Bsword%5D=analytics you'll see several extensions for inserting a Google Analytics code on your site. m1_google_analytics seems to be the most popular and is one I've used in the past, although I'm not positive its completely in line with what Google requires today.
Hope that helps!
Jeff
Hope that helps!
Jeff
Recently I did an experiment that seemed to work. I just added the code that Google provides to the setup section of our main template record. It looks like this:
The advantage of this is that I was sure I inserted the very latest code from Google.
In Him,
Mark
typoscript wrote:
page.headerData.20 = TEXT
page.headerData.20.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>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-#######-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
)
page.headerData.20.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>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-#######-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
)
The advantage of this is that I was sure I inserted the very latest code from Google.
In Him,
Mark
Total Posts: 3 - Pages (1): [1]



aim
Author: