# django-funkymetrics
django-funkymetrics is a super simple Django application for easily tracking events and submit them asynchronously to KISSmetrics using celery tasks.
## Features
Track app events easily
Submits analytics events asynchronously to KISSmetrics
## Installation
Add the KISSmetrics JS snippet to your project template(s).
Install django-funkymetrics:
pip install django-funkymetrics
Alternatively, download the source code and manually add it to your PYTHONPATH.
Set your KISSmetrics API key:
KISS_API_KEY = ‘<your_api_key>’
Track events and profit.
## Prerequisites
The library assumes that Celery is installed and configured for the Django project. Tasks are automatically created for each record_event.
## Usage
Simply import record_event in your code where you want to track events, and call it as needed:
from funkymetrics.events import record_event
# Without properties record_event(request, ‘downgraded’)
# With properties record_event(request, ‘upgraded plan’, {‘to_plan’: ‘Standard’})
The request object is used to identify the user the event is associated with.
When the request isn’t available, a user instance can be passed instead. Note that we can’t extract the anonymous KISSmetrics identifier from the user object, so it doesn’t really make sense to pass anonymous users.
## Identifying users
Anonymous users are identified by their KISSmetrics anonymous ID (ie. the value of the km_ai cookie).
Authenticated users are identified by their username.
## Future stuff
Overriding user identifiers
Queue events locally and submit in batches
Metadata
Release files for django-funkymetrics 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| django-funkymetrics-0.1.9.tar.gz | 4.1 kB | Without provenance | Details |
Release files / django-funkymetrics-0.1.9.tar.gz
| Download URL | django-funkymetrics-0.1.9.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
349559ee336245ab59da3f5b475d4b45e65a6050d13fcd63bc654be9de3e35fe
|
|
BLAKE2b-256 checksum How to use checksums |
b564494bf1c98f6f287a9b70aeb54c1720918c601592594c54fe95753dfa70bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-funkymetrics 0.1.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.