Skip to main content

Library to track user interactions in Dash applications

Project description

Dash Tracker

Dash Tracker is a lightweight tracking library for Dash applications. It logs user interactions, page views, and navigation events, sending the data to a specified tracking endpoint or printing it to the console for development purposes.

Features

  • Tracks full-page loads and internal navigation events.
  • Captures user information from Flask sessions (ID, email, full name).
  • Supports ignoring specific routes and callbacks.
  • Sends tracking data via HTTP requests or logs to the console.
  • Seamless integration with Dash and Flask.

Usage

Simply instantiate Tracker with your Dash app:

from dash import Dash
from dash_user_tracker import Tracker

app = Dash(__name__)
tracker = Tracker(app, tracker_endpoint="https://your-tracker-endpoint.com")

If no tracking endpoint is provided, events are logged to the console.

The information captured by the tracker will look like this:

{
    "event": "page_view",
    "data":
    {
        "ip": "127.0.0.1",
        "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36",
        "base_url": "http://127.0.0.1:8050/",
        "url": "http://127.0.0.1:8050/",
        "url_root": "http://127.0.0.1:8050/",
        "referrer": null,
        "path": "/",
        "full_path": "/?",
        "method": "GET",
        "user_id": "anonymous",
        "email": "anonymous",
        "full_name": "anonymous"
    },
    "timestamp": "2025-01-30T20:29:28.543062+00:00"
}

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

dash_user_tracker-1.0.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

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

dash_user_tracker-1.0.0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file dash_user_tracker-1.0.0.tar.gz.

File metadata

  • Download URL: dash_user_tracker-1.0.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.4 Darwin/24.1.0

File hashes

Hashes for dash_user_tracker-1.0.0.tar.gz
Algorithm Hash digest
SHA256 257b9836d642c8bd3e654547b5aeea6b601991f1ba07671c457dcce5dbf3f1f1
MD5 37efd7530d1664f6f2bb5b8fdb08348f
BLAKE2b-256 5790920baeb72df5855d80059761e7024711c008fc6ed161a7ccfa888811fb53

See more details on using hashes here.

File details

Details for the file dash_user_tracker-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: dash_user_tracker-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.4 Darwin/24.1.0

File hashes

Hashes for dash_user_tracker-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e9732250279f0f16cf3bc3bf7e190bfb5371b4365f9005477c6d3ad7f01630c4
MD5 bf6fcdfb281a0be7cfe986ecd4c3014f
BLAKE2b-256 de1f456b77dfeda944fe07f3b8eb339ad4ff237f770bce0eb3362aa4d7e6f3ce

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