[Answered ]-Django count guest user when visiting of index page

2👍

In fact there are different available 3rd party package to perform to provide website analytics.But since you only need visitor statistics the following can help you ; django-tracking, django-visitor and django-statistics. But after checking the django-statistics reposiotry it seems like it’s has the former packages as dependencies, which means it’s a kind of wrapper for both, but as I see the last contribution is 3 years ago, while the last contribution in django-tracking is just 3 months ago. So I will recommend django-tracking.

 pip install django-tracking

settings.py

INSTALLED_APPS = (
        'django.contrib.admin',
        'django.contrib.auth',
        'django.contrib.contenttypes',
        'django.contrib.sessions',
        'django.contrib.sites',
        ...
        'tracking',
        ...
    )

migration

python manage.py migrate

For more configuration, check the README

👤Dhia

Leave a comment