A Django app for tracking website visitors
Project description
ICSwebtracker
A simple, lightweight Django app for tracking website visitors without JavaScript.
Features
- Track page visits with IP address, user agent, and other metadata
- Configurable exclusion rules for paths and IP addresses
- Easy-to-use admin interface for viewing visitor data
- Works with Django's built-in authentication system
- Optimized for low-traffic sites (less than 1,000 visitors per month)
- No JavaScript required - works server-side with Django middleware
Installation
pip install icswebtracker
Quick Start
- Add 'icswebtracker' to your INSTALLED_APPS:
INSTALLED_APPS = [
# ...
'icswebtracker',
]
- Add the middleware:
MIDDLEWARE = [
# ...
'icswebtracker.middleware.TrackMiddleware',
]
- Run migrations:
python manage.py migrate icswebtracker
- Configure settings (optional):
WEBTRACKER_SETTINGS = {
'ENABLED': True,
'IGNORE_PATHS': ['/admin/', '/static/', '/media/'],
'IGNORE_IPS': ['127.0.0.1'],
'TRACK_AUTHENTICATED': True,
'TRACK_ANONYMOUS': True,
'RESOLVE_COUNTRY': False,
}
Usage
Visit data is available in the Django admin interface. You can also query the data programmatically:
from icswebtracker.models import Visit
# Get all visits
all_visits = Visit.objects.all()
# Get visits to a specific page
page_visits = Visit.objects.filter(path='/some/page/')
# Get visits from a specific country
country_visits = Visit.objects.filter(country='US')
Configuration Options
ENABLED: Enable or disable tracking (default: True)IGNORE_PATHS: Paths to exclude from tracking (default: ['/admin/', '/static/', '/media/'])IGNORE_IPS: IP addresses to exclude from tracking (default: [])TRACK_AUTHENTICATED: Whether to track authenticated users (default: True)TRACK_ANONYMOUS: Whether to track anonymous users (default: True)RESOLVE_COUNTRY: Enable IP to country resolution (default: False, requires GeoIP2)
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
icswebtracker-0.1.1.tar.gz
(7.5 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file icswebtracker-0.1.1.tar.gz.
File metadata
- Download URL: icswebtracker-0.1.1.tar.gz
- Upload date:
- Size: 7.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cc0c9ba0a7333ee75c6048b3fbb16734e4f9a4552cce2f3a4f33f4cb593dcad
|
|
| MD5 |
0a5ea523111cbabfb061922c986a8f79
|
|
| BLAKE2b-256 |
cbf0f221c0e6c03aeaba8ca634fb3b2f0b5d1528e830d8fd3008b7b15dfac2a4
|
File details
Details for the file icswebtracker-0.1.1-py3-none-any.whl.
File metadata
- Download URL: icswebtracker-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
453a0f4fabe02a05fde61b461bd66511e2e5b41ce4ab34b1fead0d0a9723158b
|
|
| MD5 |
40d2e4390bed6065a741e5903ae2dac2
|
|
| BLAKE2b-256 |
8f7a439e1551043ec495a2ef382bc9547c87ed1eb1515242edbb1c592a8c254f
|