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
Re: adding Google analytics [message #163478 is a reply to message #163472] Wed, 03 November 2010 09:26 Go to previous messageGo to previous message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma:
Senior Member
You are right newbit, its of course supposed to be in footer, not header. The google JS is asyncronous, but still, better to toss in footer - right should be right.

In footer.tmpl, just before </body>
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(["_setAccount", "UA-19456515-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>]


IE - doublequotes instead of singlequotes.


[Updated on: Wed, 03 November 2010 09:27]

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: Sat Nov 30 16:13:39 GMT 2024

Total time taken to generate the page: 0.05030 seconds