Technology Tools for Ministry

Community

Web-Empowered Church User Community
Total Posts: 3 - Pages (1): [1]
Author: Wei Hsu
Posted: Mar 10 2008 - 07:01 PM
Subject: Google Analytics
Is any way can add code for Google analytics?
Author: Jeff Segars
Posted: Mar 11 2008 - 09:32 AM
Subject: re: Google Analytics
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
user picture Author: Mark Stephenson
Posted: Mar 11 2008 - 10:01 PM
Subject: re: Google Analytics
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:

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>
)


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]
You must login to post a message to this conference.