If you do not have a Django Analytics account yet, please create an account and list the domains and subdomains you would like to track.
If your server is running in a virtualenv called "myenv
":
source myenv/bin/activate pip install da_tracker
Or without a virtualenv:
easy_install da_tracker
Edit Django's settings file so that da_tracker.middleware.TrackerMiddleware
is the last entry in the MIDDLEWARE
list (or MIDDLEWARE_CLASSES
in Django v1.9 or earlier):
MIDDLEWARE = [ 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', ... 'da_tracker.middleware.TrackerMiddleware' ]
Be sure to restart your server so that the new settings take effect.