4

I had trouble setting up GA on one of my websites so I set up a very simple test environment with a new domain name and just a single page - the default page. Even in this simple environment I couldn't get GA to validate me.

My environment is as follows:

Site: www.example.com My default page contains the following:

<html> <head> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-25700000-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})(); </script> </head> <body> example.com Google Analytics test </body> </html> 

I am 10000000% sure that the tracking code provided to me is the tracking code included in the above script. I simply copied and pasted the code block.

I've waited days after doing the config since I know it may take GA time, but certainly shouldn't take 3 days.

The old version of GA shows:

and the new version shows:

Note that the screenshot of the new version has the weird "December 1969" thing which I've read about in other forums and seems (?) unrelated to my problem.

How can I make this work?

1
  • did you ever find an answer to this? Commented Oct 31, 2012 at 4:09

1 Answer 1

2

Your page has no <body>...</body> section, which makes it invalid HTML. Try putting a body in and see if that cures the problem.

1
  • Good catch - Unfortunately I just posted the wrong code in the question; it's right in the actual version. Commented Sep 16, 2011 at 20:42

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.