Crate umami_metrics

Source
Expand description

A Rust library for sending metrics to Umami, a self hosted and privacy preserving metrics stack.

Supports both pageview and event metrics.

§Basic Example:

use umami_metrics::Umami;

let umami = Umami::new(
    "website_id".to_string(),
    "https://umami_instance.com".to_string(),
);

let status = umami.pageview(
    "/".to_string(),
    "click".to_string(),
    "eee".to_string(),
    "tets".to_string(),
    "asdfasdfasfd".to_string(),
).await;

let status = umami.event(
    "/".to_string(),
    "click".to_string(),
    "eee".to_string(),
    "tets".to_string(),
    "asdfasdfasfd".to_string(),
    "asdfasdf".to_string(),
).await;

Modules§

types
Event payloads are found at the bottom of this page: https://umami.is/docs/api

Structs§

Umami
A struct representing an instance of a page tracked by Umami.