Regarding javascript issue (Design/Themes)

by Atul Bhalerao @, India Pune, Thursday, September 18, 2014, 14:11 (1795 days ago)

Hi there

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

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

Thanks
Atul Bhalerao

Avatar

Regarding javascript issue

by Auge ⌂ @, Friday, September 19, 2014, 11:21 (1795 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!

RSS Feed of thread
powered by my little forum