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_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-0.1.1.tar.gz (5.5 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-0.1.1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dash_user_tracker-0.1.1.tar.gz
  • Upload date:
  • Size: 5.5 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-0.1.1.tar.gz
Algorithm Hash digest
SHA256 82523289d2573b67b2020268ddc36093a817b6c648832309997b981e3ef3df28
MD5 c9274c1c6592f326a785510cbd9f8bdf
BLAKE2b-256 34ee768f75b037b0100a443ac97785fdb8c62ebd91cd65f9f096c0005f76ad0c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dash_user_tracker-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.7 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-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 02ce78200c8eafc5e775cd2426ae455941d050ac6b62e42fe52c763d4bf907c6
MD5 185df77cef692849cc1da964b00e12da
BLAKE2b-256 9a7a7febde93fde34f18f3230e8df9673837ffd5e76bfcef0975cdf324515e1c

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