Firefox PHP

After inserting Google Analytics code in footer.tpl, the footer disapeared

Posted by netfuchs 
After inserting Google Analytics code in footer.tpl, the footer disapeared
December 16, 2013 09:57AM
I inserted the following code in the file footer.tpl of my template.
After that, the whole footer disapeared.
Where ist the mistake?
Thanks for your help.

Language: HTML
<!-- BEGIN TEMPLATE footer.tpl --> <div id="footer-plug"> This <a href="http://www.phorum.org/">forum</a> is powered by <a href="http://www.phorum.org/">Phorum</a>.   </div>   </div> <!-- end of div id="phorum" --> <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';, ';XX-XXXXXXXX-X';, ';mydomain.tld';); ga(';send';, ';pageview';);   </script> </body>   </html> <!-- END TEMPLATE footer.tpl -->
Same for me.
¿Do you found a solution to that problem?
The "{" was the problem. (it was so obviously...)
You need to put your code this way:

Language: Javascript
<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';, ';XX-XXXXXXXX-X';, ';mydomain.tld';); ga(';send';, ';pageview';);   </script>
Re: After inserting Google Analytics code in footer.tpl, the footer disapeared
July 31, 2014 11:42AM
It works.
Thank you for your help.
Re: After inserting Google Analytics code in footer.tpl, the footer disapeared
June 19, 2015 09:02PM
@ raulramirez

You rock man, this worked like a champ.

Google just gives you the code. It doesn't tell you how to space out the lines. You gave EXTREMELY helpful information and fixed another bug I was having with my forum.

Thanks!!
Sorry, only registered users may post in this forum.

Click here to login