FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » General » PHP discussions » Google Analytics
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Google Analytics [message #163157 is a reply to message #163150] Sun, 03 October 2010 14:57 Go to previous messageGo to previous message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma:
Senior Member
var s = document.getElementsByTagName('\script\')[0]; s.parentNode.insertBefore(ga, s);

is not correct

var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);

is correct (apostrophe on the wrong place)

You have to backslash all the apostrophes if you place them in footer.

Like this
</script>
<div style="text-align: center;">
<script type="text/javascript"><!--
google_ad_client = "pub-89928376906811";
/* 728x90, created 9/23/10 */
google_ad_slot = "1253056536";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<br>
<br>
</b><b>.::</b> Didn't Find What You Are Looking For? Visit Our Parent
Site <a href="http://volvospeed.com/vs_forum/">Volvospeed</a> <b>::.</b>
<b><br>.::</b> <a href="mailto:webmaster(at)volvospeed(dot)com">Contact</a> <b>::</b>
<a href="index.php?t=index&amp;">Home</a> <b>::.<br>
</td></tr></table>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push([\'_setAccount\', \'UA-315562-4\']);
_gaq.push([\'_trackPageview\']);
(function() {
var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true;
ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + <?php echo google-analytics.com/ga.js\';
var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>


[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message icon14.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Adding javascript code to a php doc
Next Topic: Problems getting LDAPS to work
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Dec 03 18:36:09 GMT 2024

Total time taken to generate the page: 0.05625 seconds