Integration of your analytics service is very simple. There are four steps: installing the package, adding it to the list of installed Django applications, adding the template tags to your base template, and configuring the services you use in the project settings.
To install django-analytical the analytical package must be added to the Python path. You can install it directly from PyPI using easy_install:
$ easy_install django-analytical
$ git clone https://github.com/jcassee/django-analytical.git
Then install the package by running the setup script:
$ cd django-analytical $ python setup.py install
After you installed django-analytical, add the analytical Django application to the list of installed applications in the settings.py file of your project:
INSTALLED_APPS = [ ... 'analytical', ... ]
Without configuration, the template tags all render the empty string. Services are configured in the project settings.py file. The settings required to enable each service are listed here:
CHARTBEAT_USER_ID = '12345'
CLICKMAP_TRACKER_CODE = '12345678....912'
CLICKY_SITE_ID = '12345678'
CRAZY_EGG_ACCOUNT_NUMBER = '12345678'
GAUGES_SITE_ID = '0123456789abcdef0123456789abcdef'
GOOGLE_ANALYTICS_PROPERTY_ID = 'UA-1234567-8'
HUBSPOT_PORTAL_ID = '1234' HUBSPOT_DOMAIN = 'somedomain.web101.hubspot.com'
KISS_INSIGHTS_ACCOUNT_NUMBER = '12345' KISS_INSIGHTS_SITE_CODE = 'abc'
KISS_METRICS_API_KEY = '0123456789abcdef0123456789abcdef01234567'
MIXPANEL_API_TOKEN = '0123456789abcdef0123456789abcdef'
OLARK_SITE_ID = '1234-567-89-0123'
OPTIMIZELY_ACCOUNT_NUMBER = '1234567'
PERFORMABLE_API_KEY = '123abc'
REINVIGORATE_TRACKING_ID = '12345-abcdefghij'
WOOPRA_DOMAIN = 'abcde.com'
The django-analytical application is now set-up to track visitors. For information about identifying users, further configuration and customization, see Features and customization.