trackEvent static method

Future<void> trackEvent(
  1. String eventName, {
  2. Map<String, Object?> properties = const {},
})

Records an event the app performed, such as a purchase.

The server adds new events and properties to the project's catalog. properties are also evaluated against Digia-owned rules.

Property values may be strings, numbers, booleans, or lists of those. Any other value (null, a map, an object) is dropped with a warning; the event is still recorded. Strings over 512 characters are truncated.

Queued and sent in batches alongside campaign analytics; never blocks.

Implementation

static Future<void> trackEvent(
  String eventName, {
  Map<String, Object?> properties = const {},
}) {
  return SDKInstance.instance.trackEvent(
    eventName,
    properties: properties,
  );
}