Forum Moderators: DixonJones
We are using the new js code which was working fine in the body tag, but now, even though Analytics is saying that our site is being tracked, we are not seeing any reporting data for over two days.
The Google Help people said to wait 24 hours for reporting and have not answered any other of my requests for help.
Anybody have any ideas as to why this is failing?
Hmmm, all this time working with GA and I've never thought about putting it in the <head>. I've had more than a few experiences where that code did not execute quick enough and if it were in the <head>, I think I'd have some performance issues to contend with, yes?
Have you tried this?
www.SiteScanGA.com
Google actually recommend the above tool in their help section.
About an hour ago I moved the code in front of some other javascript in the head in case that was the problem. Still waiting for the data to refresh to see if anything shows up.
This is from their site:
We generally recommend that you place the Google Analytics tracking code immediately before the closing </body> tag of your pages in order to avoid any issues with page loading delays for visitors with slow connection speeds. However, there are several situations where it might make more sense for you to install the code in the head:* When using frames
* If your pages call _link or _linkByPost
* If you're using custom JavaScript functions that may conflict with the ga.js file
We had to do this because of item #2
I'm a big fan of analytics, but getting a sale is much more important than tracking one ;)
Google states that the js must execute before the _link call and that is why the said to put it in the head.
I was thinking about moving the code to the beginning of the <body> as it was not having a problem at the bottom of the <body> previously. Any thoughts on this?
I'm a big fan of analytics, but getting a sale is much more important than tracking one
Andy, I'm totally with you on that one. The reason we are doing this is to track sales as they leave our site and go to our partner's site. We have been depending on organic traffic and now want to know more about where the sales are coming from so that we can do some real grown up person advertising.