I’m trying to implement Google Analytics in my MVC website. First, I tried creating a GA account. Unfortunately, I’m developing locally on localhost which isn't a valid site URL, but I found a fix that will hopefully work here http://www.objectpartners.com/2011/05/26/setting-up-google-analytics-on-localhost/#comment-5960.
Then, I copied the generated JS tracking code and pasted it to a view. However, I found this article (http://analyticsimpact.com/2011/01/20/google-analytics-on-intranets-and-development-servers-fqdn/) about using NuGet package "GoogleAnalyticsTracker" which is supposed to let you track your site by using .NET framework. I followed these steps by adding the code to a controller, but the nothing is shown in the view.
I guess one solution would be creating a new GA account, copy the JS tracking code and paste it into /Views/Shared/_Layout.cshtml.
Anyone has experience implementing Google Analytics in a MVC4 application?
Thank you!