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:

<script type="text/javascript">

var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-25700000-1']);

  (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);})();

example.com Google Analytics test

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?

  • did you ever find an answer to this?
    – Pure.Krome
    Oct 31, 2012 at 4:09

1 Answer 1


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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.