Avatar

Regarding javascript issue (Design/Themes)

by Auge ⌂, Friday, September 19, 2014, 11:21 (3506 days ago) @ Atul Bhalerao

Hello

I am new to your forum CMS
here i was facing problem with forum and javascript

I want to insert javascript in the template, let me tell you the javascript is of google analytics

Please Help

What's the problem with it?

Put the JS code just before the closing tags of the document template (themes/default/main.tpl).

<!-- many HTML elements -->
  <script>
   (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
   (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
   m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
   })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
   ga('create', 'UA-00000000-0', 'auto');
   ga('send', 'pageview');
  </script>
 </body>
</html>

Tschö, Auge

--
Trenne niemals Müll, denn er hat nur eine Silbe!


Complete thread:

 RSS Feed of thread