Google analytics on page not working on my ASP.NET MVC 3 Razor website

We recently launched the new website http://atlascode.com , and since launching, I have not been able to get analytics on the page working on the website. Google also claims that my tracking code does not work, but I think this is wrong.

Whenever I try to load analytics on a page, I get an error message:

We detected problems in your setup. This can cause problems loading analytics on the page. Your site does not download ga.js from Google.

  • If you host the Google tracking code on your servers, it is not updated automatically and may miss important changes.

  • We did not find the tracking snippet on your site. Unable to load statistics on the page. Verify that tracking is installed correctly. If your fragment is included in a separate JavaScript file, you will have to manually check whether it is loaded correctly.

- ends -

I just copied and pasted the tracking code onto the website and did nothing unusual. I also verified that in the web properties settings my web resource name and default URL were atlascode.com.

Any ideas you guys really welcome.

EDIT: Added screenshot of Google Analytics error http://min.us/mdqlrhj

Thank you in advance

Simon

+4
source share
3 answers

Well, there are whole people on the Internet complaining about the same problem. I noticed something funny.

Most developers like to exclude Analytics tracking code for registered administrators and try to check In-Page Analytics while they are logged in. So there is actually no ga.js

+1
source

In my experience, this happened when I did not set my default URL to exactly match the URL specified in the profile.

Matt

PS Someone beat me to your source!

0
source

The same problem had a problem with Magento Enterprise, but the solution was quite simple: you just need to place the GA code before the <head> tags. After this simple fix, the In-Page tracks work.

Update

Also, make sure your site does not have a freakiller.

0
source

All Articles