Okay so the website I webmaster for http://www.detroitdungeon.com has been having some analytic issues as of lately. I have the google analytics plugin installed and it was working fine for quite sometime. All of a sudden the plugin caused IE users to crash after the page had loaded. So instead of using the plug in I decided to use the code given to me by google and I placed it in the footer of the website. Doing this caused the webpage to crash with all browsers. after the code has been placed in the footer the source code reads
<b>Parse error</b>: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in <b>/home/content/36/5385336/html/detroitdungeon/wp-content/themes/delighted_black2/footer.php</b> on line <b>5</b>
Here is footer.php
<?php
include('footer_content.php');$delight_mainfont = get_option('delight_mainfont');echo '<div id="footcopy"><span class="left"><a href="http://zenverse.net/delighted-black-wordpress-theme/">Delighted Black</a> designed by <a href="http://yourchristianspace.com">Christian Myspace</a> & <a href="http://www.digitaldesignzmedia.com">Designed By: Digital Designz Media Group</a></span><span class="right">In conjunction with <a href="http://pingler.com">Ping Services</a> <span style="font-family:tahoma;">|</span> <a href="http://frenchteacherjobs.com">French Teacher Jobs</a> <span style="font-family:tahoma;">|</span> <a href="http://mathsteacherjobs.com">Maths Teacher Jobs</a> </span>
<div class="clear"></div></div></div>
<!--/page-->
<script type="text/JavaScript">var TFN='';var TFA='';var TFI='0';var TFL='0';var tf_RetServer="rt.trafficfacts.com";var tf_SiteId="254g7d80916f3af3bbc0ac2542301cd153424f1b1aa7h16";var tf_ScrServer=document.location.protocol+"//rt.trafficfacts.com/tf.php?k=254g7d80916f3af3bbc0ac2542301cd153424f1b1aa7h16;c=s;v=5";document.write(unescape('%3Cscript type="text/JavaScript" src="'+tf_ScrServer+'">%3C/script>'));</script><noscript><img src="http://rt.trafficfacts.com/ns.php?k=254g7d80916f3af3bbc0ac2542301cd153424f1b1aa7h16" height="1" width="1" alt=""/></noscript>
</body></html>';
?>
I tried going with godaddy analytics and the same issue is happening. Any help would be GREATLY appreciated.
'
in the line beginning with<script type="text/JavaScript...
seem to be breaking the echo string; try to replace them all with double quotes"
- or rewrite footer.php without usingecho
.