gazfocus Posted January 18, 2010 Share Posted January 18, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/188941-google-tracking-code-question/ Share on other sites More sharing options...
haku Posted January 19, 2010 Share Posted January 19, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/188941-google-tracking-code-question/#findComment-997777 Share on other sites More sharing options...
gazfocus Posted January 19, 2010 Author Share Posted January 19, 2010 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'. Quote Link to comment https://forums.phpfreaks.com/topic/188941-google-tracking-code-question/#findComment-998003 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.