Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: sbclansite.com - kesäkuu 12, 2006, 12:45:58 AP

Otsikko: Where to put google analytic tracking code to get it working ?
Kirjoitti: sbclansite.com - kesäkuu 12, 2006, 12:45:58 AP
Hey anyone knows how i can add google analytic code on my forums as i cannot find <body> < /body> section anywhere i try to add it in index.template.php after before the <title> but google doesnt pick it up at all. So where to put that code. Help required  ;D

Code looks like this :

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct="UA-xxxx-x";
urchinTracker();
</script>
Otsikko: Re: Where to put google analytic tracking code to get it working ?
Kirjoitti: StarBuG - kesäkuu 19, 2006, 02:05:58 IP
In index.template.php find:


</body></html>';


Add before:


<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "your CODE here";
urchinTracker();
</script>


;)
Otsikko: Re: Where to put google analytic tracking code to get it working ?
Kirjoitti: aandreil - elokuu 11, 2007, 08:54:21 IP
I've seen this suggested in loads of places, but it doesn't seem to work with me.

Neither does the Ad Manager addon. What's going on, I wonder?