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 03: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 -->
Re: After inserting Google Analytics code in footer.tpl, the footer disapeared
March 29, 2014 07:36AM
Same for me.
¿Do you found a solution to that problem?
Re: After inserting Google Analytics code in footer.tpl, the footer disapeared
March 29, 2014 07:45AM
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 05:42AM
It works.
Thank you for your help.
Re: After inserting Google Analytics code in footer.tpl, the footer disapeared
June 19, 2015 03: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