Seems like the drupal google analytics module (which is great imo!) does not generate valid XHTML code...

as you can see on the following URL, the only XHTML error I have is the one caused by the google analytics module

http://validator.w3.org/check?uri=http://www.uzegt.be

the google analytics module generates the analytics code right after the tag, while it should be placed right beFORE the tag to be XHTML valid

did anyone else notice this? and found a way to solve this?

Comments

jhuckabee’s picture

This appears to be an issue with your theme, not the GA module.

What version of drupal are you using?

Also, look in your theme and see where this tag is:

print $closure

It should be before the closing body tag.

jorre’s picture

that's it!

my mistake guys! somehow it got written below! the tag...

Pakfriet.be
Uzegt.be

sepeck’s picture

You should probably file an issue with the project itself. It is likely that the forum post will be missed by the module maintainer.

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

binodc’s picture

This code seem to be Xhtml valid

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "Change to Account Number";
urchinTracker();
</script>