Recently I’ve been asked how to get Google Analytics working in an intranet site with a single name in the URL, for example: http://intranet. The first time I added Google Analytics to a site it was a development site accessed by server-name:port-number. For days after correctly adding the tracking code there was still no data showing up in the Google Analytics dashboard reports.
Turns out the fix required adding one simple JavaScript call to a Google JavaScript API function. When adding Google Analytics tracking code to a site with a single name in the URL you need to call _setDomainName(“none”) prior to making the call to _trackPageView:
