Web Consulting Washington DC

It’s a dirty job, but somebody’s gotta do it.

Google Analytics: What is this /NaN thing?

May 31st, 2007 by Ernesto Gluecksmann

Recently we started setting up our clients with Google Analytics. After Google’s recent upgrades to a more Ajax styled reporting GUI, we found it to be quiet the upgrade. There’s tremendous improvements in layout and flexibility, along with simplified explanations. Very easy for our customers to get in there and get around.

For one of our clients, we started to see the characters “/NaN” as one fo the pages of significant traffic, located in the Content reports. There’s no page called /NaN, it is actually a JavaScript error that means “Not a Number”.

Well, it turns out that this is usually an indication that there’s some other JavaScript on the web page that interfering with the JavaScript that is download from Google. The way to fix this, is to move Google’s code up into the <head> tag of your web page.

Google Urchin JavaScript Code

We usually add the Google Urchin code at the bottom as indicated by Google, but in this case, the second recommendation it above all other JavaScripts.

Google Urchin JavaScript Code moved

Once we did that, Google Urchin code was run first and that fixed our odd /NaN problem.

4 Responses to “Google Analytics: What is this /NaN thing?”

  1. Kym Says:

    Thanks for posting this.

    We had supposed Google Analystics Experts look at a couple of our client’s site and they never even commented on the funnel showing Nan URLs let alone know the answer!

    You have save us a lot of time!

  2. Ben Says:

    Thanks for this post. I ran into this issue for the first time today and your post is the only answer I could find.

  3. JD Says:

    I tried your solutions and it didn’t work. My google results when flat and the page was not even working. Do you have any other thoughts regarding the NaN problem?

  4. EG Says:

    Hmm, that sounds more like a problem with the page itself. Moving your GA code into different positions, should not affect the page. If you’re saying the page itself is now broken, then you may have overwritten some of page’s important tags. And, GA may skip over broken pages if it can’t tell it’s an HTML document. I’ll email you directly.

Leave a Reply