Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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?

share|improve this question
    
did you ever find an answer to this? –  Pure.Krome Oct 31 '12 at 4:09
add comment

1 Answer

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

share|improve this answer
    
Good catch - Unfortunately I just posted the wrong code in the question; it's right in the actual version. –  Howiecamp Sep 16 '11 at 20:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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