Skip to main content

Django Analytics simple is a package designed to facilitate tracking and analysis of data in Django web applications

Project description

Django Analytics Simple

See documentation at : Español | English

Django Analytics simple is a Django package designed to facilitate tracking and analysis of user data in web applications. It provides middleware that records information about users, including details such as browser, operating system, device, and geographical location. The collected data is stored in a new database table, enabling detailed analytics to improve user experience and make informed decisions in application development and maintenance.

Installation

You can install Django Analytics simple using pip:

pip install django_analytics_simple

Then, add 'django_analytics' to your Django project's installed apps in the settings.py file:

INSTALLED_APPS = [
    ...
    'django_analytics_simple',
    ...
]

Next, include the provided middleware in your project's middleware stack in the same settings.py file:

MIDDLEWARE = [
    ...
    'django_analytics_simple.middleware.AnalyticsMiddleware',
    ...
]

Configuration

Django Analytics simple requires the GeoLite2-City.mmdb file for IP geolocation, which should already be included in the package, and it will be updated monthly.

Additionally, you can set the ANALYTICS_LANGUAGE variable in your Django project's settings.py file to specify the language for location data retrieval.

ANALYTICS_LANGUAGE = 'en'  # Specify the language for location data retrieval

Please note that you may need to review the languages supported by MaxMindDB for proper configuration.

Dependencies

Django Analytics simple relies on the following external libraries:

[MaxMindDB] https://pypi.org/project/maxminddb/ [User-agents] https://pypi.org/project/user-agents/ Ensure that these dependencies are installed before using Django Analytics.

Usage

After configuring Django Analytics simple, run the following commands to apply migrations:

python manage.py makemigrations django_analytics_simple
python manage.py migrate

License

This project is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. See the LICENSE file for details.

Author

Santiago Nestor Britos - s.britos@hotmail.com

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_analytics_simple-2024.0.9.tar.gz (25.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_analytics_simple-2024.0.9-py3-none-any.whl (26.2 MB view details)

Uploaded Python 3

File details

Details for the file django_analytics_simple-2024.0.9.tar.gz.

File metadata

File hashes

Hashes for django_analytics_simple-2024.0.9.tar.gz
Algorithm Hash digest
SHA256 5d9d4cb1bc58d291164fb0e1e57587c4e507d09c5887240a8ff9843ce94c75fd
MD5 9003254d89ea116d2611834d8d7533fb
BLAKE2b-256 1bf138294d42fdfea1f45efc24fc4b1c00f58ee454cb2c65cfbc582d99535cb9

See more details on using hashes here.

File details

Details for the file django_analytics_simple-2024.0.9-py3-none-any.whl.

File metadata

File hashes

Hashes for django_analytics_simple-2024.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 5ee6647384e47778f162ddc41afbcd7dc80b55f501fa0d7fca2440674c9ab109
MD5 280822e610e8300f8c34546ad580f4b9
BLAKE2b-256 f5398e82c87f8ac7f293074031102c9ca6dd8b11595b7303f5ee75a76a6035b8

See more details on using hashes here.

Supported by

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