This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

A Django application for integrating KISSmetrics customer analytics

Project Description
# Django Kiss

A Django application for integrating KISSmetrics customer analytics.

KISSmetrics recommends developers record events using their JavaScript API, however it can be difficult to tell when to record an event using only client side code. For example, how does the client know when a form is successfully submitted?

Django Kiss uses the Django Session Framework to record events against a users session. The recorded in the session are then written out to an HTML page as JavaScript. The user's browser executes the JavaScript, firing the tracking requests to the KM API.

## Installation

* Install the package.

* Update your ``:

INSTALLED_APPS += ('kiss',)
MIDDLEWARE_CLASSES += ('kiss.middleware.KissMiddleware',)


* Django Kiss requires the Django Session Framework to be installed.

## Usage

Recording an event with Django Kiss is a two step process. First an event must be recorded against a request using `kiss.add_kiss`. Second, the user's browser must load a page with KM tracking JavaScript.

Record an event against the user's sessions:

import kiss

def view(request):
kiss.add_kiss(request, ['record', 'event_name'])

Include `kiss/core.html` in your base template to write out KM tracking JavaScripts and the events stored against the user's session:

{% include 'kiss/core.html' %}

To associate a particular request with an identity you can add a signal listener:

from django.contrib.auth import signals as auth_signals

def user_logged_in_kiss(sender, **kwargs):
request = kwargs['request']
user = kwargs['user']
kiss.add_kiss(request, ['identify',])
kiss.add_kiss(request, ['record', 'login'])

## Tests

To run the tests: test kiss --settings=kiss.tests.test_settings

## License

Release History

Release History

This version
History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django_kiss-0.1.1.tar.gz (5.3 kB) Copy SHA256 Checksum SHA256 Source Apr 29, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting