Skip to main content

Django middleware reporting requests to Ackee

Project description

django-ackee-middleware

CI codecov License PyPI

Django middleware reporting requests to Ackee, self-hosted analytics tool for those who care about privacy. Alternative to using the client-side JS tracker.

Installation

$ pip install django-ackee-middleware

If you don't have the Ackee instance yet, you can quickly deploy it on Heroku.

Configuration

Add the middleware as the first one in your Django settings.py:

MIDDLEWARE = [
    "ackee.middleware.TrackerMiddleware",
    "django.middleware.security.SecurityMiddleware",
    ...
]

Then add the following properties:

ACKEE_SERVER = "https://myackeeserver.com"
ACKEE_DOMAIN_ID = "YOUR DOMAIN ID"
ACKEE_IGNORED_PATHS = [
    "^/admin/.*"
]

Remember to change the server and domain ID to your values.

Development

This project is using pipenv to manage the development dependencies. To install them run:

$ pipenv install

Publishing

There are two pipenv scripts that make building and publishing the package easier:

  • pipenv run build - builds the distribution package
  • pipenv run upload - uploads the package to PyPI

Project details


Download files

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

Source Distribution

django-ackee-middleware-0.1.1.tar.gz (4.2 kB view hashes)

Uploaded Source

Built Distribution

django_ackee_middleware-0.1.1-py3-none-any.whl (6.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page