FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » adding Google analytics
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
adding Google analytics [message #163462] Tue, 02 November 2010 12:05 Go to previous message
newbit is currently offline  newbit   China
Messages: 29
Registered: November 2010
Karma:
Junior Member
How do I put Google Analytics code into my website? Please let me know which files to edit, as well as exactly where in each file to place the tracking code.

I found something that said to edit /FUDforum/thm/default/tmpl/header.tmpl, but I added the code and it didn't work. Actually, I'd prefer for Google Analytics to be in the footer instead, so as not to slow down page loading times.

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXXXXXX-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>


Please be clear in your answer, and assume that I know nothing. I've been searching this forum for answers, and it seems like most of you already know the software backwards and forwards, and you frequently abbreviate your answers to others.

[Updated on: Wed, 03 November 2010 01:38]

Report message to a moderator

[Message index]
 
Read Message
Read Message icon6.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Suppress rejection emails ?
Next Topic: uploaded pictures won't show
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 15:15:23 GMT 2024

Total time taken to generate the page: 0.04231 seconds