21 May 2007

Having registered this blog to Google Analytics, I pasted this code to bottom of template,

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-562528-12";
urchinTracker();
</script>

Actually, I do not like to let JavaScript code open to HTML document, so I remarked them to modified version,

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
<--
_uacct = "UA-562528-12";
urchinTracker();
//-->
</script>

Saved and loaded...

I read source and found that the remarked lines were all thrown, so it became,

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
</script>

Surprised enough. Is this one reason Analytics provides as-is, without JavaScript remarked? Modified again as its origin, all was then correct.

So, do not add extra HTML comment to your template(s). Blogger will cleverly remove them.

1 comment:

Unknown said...
This comment has been removed by the author.