Skip to main content

The django-clicky application integrates Clicky analytics into a Django project.

Overview

Clicky is an online web analytics tool. It is similar to Google Analytics in that it provides statistics on who is visiting your website and what they are doing. Clicky provides its data in real time and is designed to be very easy to use. This Django application provides a template tag to add the tracking code to HTML templates.

Installation

To install django-clicky, simply place the django_clicky package somewhere on the Python path. The application is configured in the project settings.py file. In order to use the template tags, the django_clicky package must be present in the INSTALLED_APPS list:

INSTALLED_APPS = [
    ...
    'django_clicky',
    ...
]

You set your Clicky Site ID in the CLICKY_SITE_ID setting:

CLICKY_SITE_ID = '12345678'

(You can find the Site ID in the Info tab of the website Preferences page on your Clicky account.)

Usage

The django-clicky application currently provides one template tags that tracks visitor clicks. In order to use the tag in a template, first load the django-clicky template library by adding {% load clicky %} at the top.

Tracking visitor clicks

Clicky uses Javascript to track every visitor click. The track_clicky tag inserts the tracking code in the HTML page. The Clicky web pages recommend adding the code directly before the closing </body> HTML tag:

    ...
    {% track_clicky %}
</body>
</html>

The Javascript code added by the template tag is asynchronous and works on both plain HTTP and secure HTTPS pages. It also contains fallback HTML code that uses <a> and <img> tags to track browsers with Javascript disabled. If you want to skip this fallback code (for example, if you want to add it to the HTML head section) you can use the CLICKY_RENDER_NON_JS_CODE setting:

CLICKY_RENDER_NON_JS_CODE = False

Clicky data can be annotated with custom properties. The most obviously useful information is whether the visitor is a logged in user. The track_clicky template tag will automatically provide Clicky with the visitor username if a user has logged into Django.

Ignoring internal visitors

Often you do not want to track clicks from your development or internal IP addresses. For this reason you can set the CLICKY_INTERNAL_IPS to a list or tuple of addresses that the template tag will not be rendered on:

CLICKY_INTERNAL_IPS = ['192.168.45.2', '192.168.45.5']

If you already use the INTERNAL_IPS setting, you could set the clicky internal addreses to this value. This will be the default from version 2.0.0 upwards.

Changelog

1.2.1

Stopped development. Use the Clicky module in django-analytical.

1.2.0

Automatically track logged in users.

1.1.0

Added the CLICKY_INTERNAL_IPS setting.

1.0.0

Initial release.

Release files for django-clicky 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-clicky 1.2.1
File Size Uploaded
django-clicky-1.2.1.tar.gz 6.7 kB Details

Release files / django-clicky-1.2.1.tar.gz

Download URL django-clicky-1.2.1.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
366152da85f453c293f9d53ba750d4d6d4781f42bf956ad5fcf4823a85e8c5f7
BLAKE2b-256 checksum
How to use checksums
eedb6710c06720dbc7bb45ea7930359789ebe344b69330185c0482df44aecac5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.2.1 This release

1 release file

1.2.0

1 release file

1.1.0

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page