Skip to content

Core usage

umami.track()
import django_umami.core

def my_function():
    django_umami.core.umami.track("someone went to my function!")

    data = django_umami.core.UmamiEventData(
        hostname="example.com",
        language = "en-GB",
        referrer = "",
        screen = "1920x1080",
        title = "abc",
        url = "/my_event",
        name = "My Custom Event"
    )

    django_umami.core.umami.track(data)

    django_umami.core.umami.track({
        "name": "My Custom Event",
        "url": "/my_page/123"
    })
umami.track_event_name()

Track using just an event name

PARAMETER DESCRIPTION REQUIRED
event_name (string) The text of the event you'd like to send.
from django_umami.core import umami

umami.track_event_name("My event")
umami.send()

This is the manual method for sending a raw event

PARAMETER DESCRIPTION REQUIRED
payload (UmamiPayload)
from django_umami.core import umami

umami.send({
    "website": "12345-6789...",
    "data": {
        "name": "my event"
    }
})