I have been looking into using Google Analytics for a private intranet application which does not have any public URL; e.g., the application might be running in http://myapplication or http://192.124.51.12.
Officially, this wouldn't be supported by Google Analytics:
Your intranet must also be accessible through a fully qualified domain name such as http://intranet.example.com. The Analytics JavaScript won't work if your intranet can only be accessed using a domain name that isn't fully qualified, such as http://intranet.
Before knowing this, I set up a GA account with a bogus domain name and started testing a local application in http://localhost, http://testdomain and http://testdomain.com. In spite of what the documentation actually says, this seems to work flawlessly and GA is picking up all hits and showing all the reports correctly.
Therefore, my questions would be:
- What is the domain name set in my GA account actually used for? It certainly doesn't seem like GA is checking that I am in said domain before actually sending and logging hits.
- Is this an actually viable solution? "Seems to work" is not a particularly strong argument, so I would like to know if people have been using GA to work with private intranets, and if there are any changes or hacks that need to be made.