Skip to main content

Django app used to track user visits.

Project description

django-user-visit

Django app for recording daily user visits

Compatibility

This package supports Python 3.8 and above and Django 3.2 and above.

Upgrading from v1 to v2

v2 added three new denormalised fields extracted from the User Agent string - device, os, browser - to make it easier to analyse directly in the database.

If you want to backfill historical data you will need to run the management command update_user_visit_user_agent_data after the upgrade.


This app consists of middleware to record user visits, and a single UserVisit model to capture that data.

The principal behind this is not to record every single request made by a user. It is to record each daily visit to a site.

The one additional factor is that it will record a single daily visit per session / device / ip combination. This means that if a user visits a site multiple times from the same location / same device, without logging out, then they will be recorded once. If the same user logs in from a different device, IP address, then they will be recorded again.

The goal is to record unique daily visits per user 'context' ( where context is the location / device combo).

Admin list view:

UserVisit list view

Admin edit view:

UserVisit edit view

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_user_visit-2.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

django_user_visit-2.0-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file django_user_visit-2.0.tar.gz.

File metadata

  • Download URL: django_user_visit-2.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Darwin/23.0.0

File hashes

Hashes for django_user_visit-2.0.tar.gz
Algorithm Hash digest
SHA256 494d3f6f38692de71436407228dc0fd1cbab87ebf75cda749340faac8a6b402d
MD5 67cc1ff3d3c520ff3d76b312b0ddc249
BLAKE2b-256 4f29827d3006a36626a7508a3e01e08b63567cbc82f6d6c05e0ea844664ae49a

See more details on using hashes here.

File details

Details for the file django_user_visit-2.0-py3-none-any.whl.

File metadata

  • Download URL: django_user_visit-2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Darwin/23.0.0

File hashes

Hashes for django_user_visit-2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b0c36d5f2214fbcc1c05c0867648d42e2a6e34f0fee547e0c1c79d2c90fe0a0c
MD5 b0d065696723adaf33a36be87887feac
BLAKE2b-256 f61ec3f418a70e56cd7538dab8c1c2f9bd507fa0ed0ae70e16313911123a9359

See more details on using hashes here.

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