How to analyze usage of an internal Django site?
We buil开发者_开发技巧t a django site for our team, and we'd like to get some usage statistics on it. I've used google analytics before, but according to this we don't access our site using a fully qualified domain name.
Is there some way I can get usage stats on the site? Is my best bet to figure out how to work with google analytics using a FQDN?
Try adding this to the tracking code.
pageTracker._setDomainName("none");
To be able to use Google Analytics to track any web site, including an internal/private site, all you need is:
- the site isn't running on http://localhost/ (tracking is disabled on 'localhost')
- users can load the JS script http://www.google-analytics.com/ga.js or https://ssl.google-analytics.com/ga.js depending on the protocol used by the site
- users can load the tracking image http://www.google-analytics.com/__utm.gif?utmwv=4.9.4
If these 3 conditions are met, you can run GA to track the audience of your application.
In the Google Analytics profile creation process, you can set any URL you want, event non existent, it has no impact at all on wheither it will track or not.
精彩评论