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.10 and above and Django 4.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.1.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_user_visit-2.1.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.3 Darwin/24.5.0

File hashes

Hashes for django_user_visit-2.1.tar.gz
Algorithm Hash digest
SHA256 0dc0256ef91b8e40fc3505e0f8538e0da0603360709c8f7c8b247c0a06feba10
MD5 11df8df7f84e17f117ffa0cfea961434
BLAKE2b-256 7e837f7eaf20e50dbd9c0ba524d604b11df1ba86cf9d4d4b80f8a2ad69e73ff4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_user_visit-2.1-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.3 Darwin/24.5.0

File hashes

Hashes for django_user_visit-2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bf09e210cadeb8f19aa3f3e7b086486e0c4bc54b93407f8f225acc8fcba055ad
MD5 df9381ccb48289dead9453f4c0081826
BLAKE2b-256 54c0131976fe9a207aefca1f27eea8deb94a2e051cd241ff020804d770d8c2ac

See more details on using hashes here.

Supported by

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