trackEvent static method

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

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.

Queued and sent in batches alongside campaign analytics; never blocks. Pass value and currency for revenue, so it can be summed.

Implementation

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