django-tracking2 0.1.3

Tracks the length of time visitors and registered users spend on your site
django-tracking2 is a Django app that tracks the length of time visitors and registered users spend on your site. Although this will work for websites, this is more applicable to web applications with registered users. This does not replace (nor intend) to replace client-side analytics which is great for understanding aggregate flow of page views.

Note: This is not a new version of django-tracking. These apps have very different approaches and, ultimately, goals of tracking users. This app is about keeping a history of visitor sessions, rather than the current state of the visitor.

Download

pip install django-tracking2

Setup

Add tracking to your project's INSTALLED_APPS setting:

INSTALLED_APPS = (
 ...
 'tracking',
 ...
)


Add tracking.middleware.VisitorTrackingMiddleware to your project's MIDDLEWARE_CLASSES before the SessionMiddleware:

MIDDLEWARE_CLASSES = (
 ...
 'tracking.middleware.VisitorTrackingMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 ...
)


Views

To view aggregate data about all visitors and per-registered user stats, do the following:

Include tracking.urls in your urls.py:

urlpatterns = patterns('',
 ...
 url(r'^tracking/', include('tracking.urls')),
 ...
)


These urls are protected by a custom Django permission tracking.view_visitor. Thus only superusers and users granted this permission can view these pages.

Available URLs

- /dashboard/ - overview of all visitor activity

Templates

- tracking/dashboard.html - for the dashboard page
- tracking/snippets/stats.html - standalone content for the dashboard page (simplifies overriding templates)

last updated on:
April 7th, 2012, 18:53 GMT
price:
FREE!
developed by:
Byron Ruth
license type:
BSD License 
category:
ROOT \ Internet \ HTTP (WWW)

FREE!

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Add your review!

SUBMIT