# 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](assets/screenshot-admin-list-view.png)
Admin edit view:
![UserVisit edit view](assets/screenshot-admin-edit-view.png)
Raw data
{
"_id": null,
"home_page": "https://github.com/yunojuno/django-user-visit",
"name": "django-user-visit",
"maintainer": "YunoJuno",
"docs_url": null,
"requires_python": ">=3.8,<4.0",
"maintainer_email": "code@yunojuno.com",
"keywords": "",
"author": "YunoJuno",
"author_email": "code@yunojuno.com",
"download_url": "https://files.pythonhosted.org/packages/4f/29/827d3006a36626a7508a3e01e08b63567cbc82f6d6c05e0ea844664ae49a/django_user_visit-2.0.tar.gz",
"platform": null,
"description": "# django-user-visit\n\nDjango app for recording daily user visits\n\n#### Compatibility\n\nThis package supports Python 3.8 and above and Django 3.2 and above.\n\n## Upgrading from v1 to v2\n\nv2 added three new denormalised fields extracted from the User Agent\nstring - device, os, browser - to make it easier to analyse directly\nin the database.\n\nIf you want to backfill historical data you will need to run the\nmanagement command `update_user_visit_user_agent_data` after the\nupgrade.\n\n---\n\nThis app consists of middleware to record user visits, and a single\n`UserVisit` model to capture that data.\n\nThe principal behind this is _not_ to record every single request made\nby a user. It is to record each daily visit to a site.\n\nThe one additional factor is that it will record a single daily visit\nper session / device / ip combination. This means that if a user visits\na site multiple times from the same location / same device, without\nlogging out, then they will be recorded once. If the same user logs in\nfrom a different device, IP address, then they will be recorded again.\n\nThe goal is to record unique daily visits per user 'context' ( where\ncontext is the location / device combo).\n\nAdmin list view:\n\n![UserVisit list view](assets/screenshot-admin-list-view.png)\n\nAdmin edit view:\n\n![UserVisit edit view](assets/screenshot-admin-edit-view.png)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Django app used to track user visits.",
"version": "2.0",
"project_urls": {
"Documentation": "https://github.com/yunojuno/django-user-visit",
"Homepage": "https://github.com/yunojuno/django-user-visit",
"Repository": "https://github.com/yunojuno/django-user-visit"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f61ec3f418a70e56cd7538dab8c1c2f9bd507fa0ed0ae70e16313911123a9359",
"md5": "b0d065696723adaf33a36be87887feac",
"sha256": "b0c36d5f2214fbcc1c05c0867648d42e2a6e34f0fee547e0c1c79d2c90fe0a0c"
},
"downloads": -1,
"filename": "django_user_visit-2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b0d065696723adaf33a36be87887feac",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4.0",
"size": 11277,
"upload_time": "2023-11-07T15:12:07",
"upload_time_iso_8601": "2023-11-07T15:12:07.132410Z",
"url": "https://files.pythonhosted.org/packages/f6/1e/c3f418a70e56cd7538dab8c1c2f9bd507fa0ed0ae70e16313911123a9359/django_user_visit-2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4f29827d3006a36626a7508a3e01e08b63567cbc82f6d6c05e0ea844664ae49a",
"md5": "67cc1ff3d3c520ff3d76b312b0ddc249",
"sha256": "494d3f6f38692de71436407228dc0fd1cbab87ebf75cda749340faac8a6b402d"
},
"downloads": -1,
"filename": "django_user_visit-2.0.tar.gz",
"has_sig": false,
"md5_digest": "67cc1ff3d3c520ff3d76b312b0ddc249",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4.0",
"size": 7946,
"upload_time": "2023-11-07T15:12:08",
"upload_time_iso_8601": "2023-11-07T15:12:08.705161Z",
"url": "https://files.pythonhosted.org/packages/4f/29/827d3006a36626a7508a3e01e08b63567cbc82f6d6c05e0ea844664ae49a/django_user_visit-2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-07 15:12:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "yunojuno",
"github_project": "django-user-visit",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"tox": true,
"lcname": "django-user-visit"
}