UmamiSendService class

Service for sending stats/events to Umami via /api/send (no authentication required).

This service does not require authentication and is suitable for sending analytics events directly to Umami or Umami Cloud using the /api/send endpoint.

Constructors

UmamiSendService({required String website, required String hostname, required String endpoint})
Creates a UmamiSendService instance.

Properties

endpoint String
The Umami endpoint URL (e.g., https://cloud.umami.is).
final
hashCode int
The hash code for this object.
no setterinherited
hostname String
The app's hostname.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
website String
The Umami website ID.
final

Methods

getCustomUserAgent() Future<String>
Returns a custom User-Agent string based on the device info.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send({required BuildContext context, required String title, required String url, required String name, String referrer = '', Map<String, dynamic>? data, String type = 'event'}) Future<bool>
Sends an event to Umami /api/send.
sendCustomEvent({required BuildContext context, required String title, required String url, required String name, Map<String, dynamic>? data, String referrer = ''}) Future<bool>
Sends a custom event to Umami.
sendPageview({required BuildContext context, required String title, required String url, String referrer = ''}) Future<bool>
Sends a pageview event to Umami.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited