Jump to content

Google Tracking Code question


gazfocus

Recommended Posts

I'm working on a website and it has some Google tracking code in the html. However, when I try to validate the page with the W3 Validator, it throws up errors with the tracking code.

 

I've read somewhere that the W3 Validator won't throw up the errors if the code is either put inside comment tags or in an external .js file.

 

What I'm wondering is, will the tracking code still work if I use either of these methods?

 

Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/188941-google-tracking-code-question/
Share on other sites

I'm thinking it must be an error somewhere else in your code that has cascaded down to the google code. I've not ever seen Google provide invalid code for their applications, though I suppose it theoretically could happen.

Hi, Thanks for your post, however, the errors are definately within the google tracking code. The errors relate to certain functions within the code not being defined. such as ('<sc'+'ript. It doesn't understand the <sc' and thinks it should be 'script'.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.