View Single Post
  #39  
Old 04-24-2008, 12:40 AM
 
GeeCee GeeCee is offline
 

Senior Member
  
Join Date: Aug 2007
Posts: 111
 

Default Re: [PATCH] Update to non-legacy Google Analytics code

This is the GA code as seen by View Source on my site:

Code:
<script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("\<script src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'>\<\/script>" )); </script> <script type="text/javascript"> var pageTracker = _gat._getTracker("xxxxxxxxxx"); pageTracker._initData(); pageTracker._trackPageview(); </script></body> </html>

This is the the validation output from http://validator.w3.org/:

Quote:
Validation Output: 7 Errors

1. Error Line 405, Column 105: document type does not allow element "script" here.

┘ics.com/ga.js' type='text/javascript'>\<\/script>" ));

?

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
2. Warning Line 405, Column 107: character "<" is the first character of a delimiter but occurred as data.

┘s.com/ga.js' type='text/javascript'>\<\/script>" ));

?

This message may appear in several cases:
* You tried to include the "<" character in your page: you should escape it as "&lt;"
* You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&amp;", which is always safe.
* Another possibility is that you forgot to close quotes in a previous tag.
3. Error Line 408, Column 30: document type does not allow element "script" here.

<script type="text/javascript">

?

The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
4. Error Line 412, Column 15: end tag for "script" omitted, but OMITTAG NO was specified.

</script></body>

?

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
5. Info Line 403, Column 9: start tag was here.

</table><script type="text/javascript">

6. Error Line 405, Column > 80: XML Parsing Error: StartTag: invalid element name.

┘gaJsHost + "google-analytics.com/ga.js' type='text/javascript'>\<\/script>" ┘┘

?
7. Error Line 412, Column 16: XML Parsing Error: Opening and ending tag mismatch: script line 403 and body.

</script></body>

?
8. Error Line 413, Column 7: XML Parsing Error: Opening and ending tag mismatch: body line 30 and html.

</html>

?
9. Error Line 413, Column 7: XML Parsing Error: Premature end of data in tag html line 3.

</html>
__________________
X-Cart Gold v4.1.10
Manchester, UK
Get SEO, PPC or just advice from Intrinsic Marketing
Reply With Quote