Event tracking


Set custom identifier for events


This method sets a custom identifier in the parameters of every event.

You can pass a custom identifier to match your customers in our database.

Declared In:
lib/modules/tracker/tracker_impl.dart

Class:
TrackerImpl

Declaration:

void setCustomIdentifier(String customIdentifier)

Parameters:

Parameter Type Mandatory Default Description
identifier String yes - Customer’s custom identifier

Return Value:
No value is returned.

Example:

await Synerise.tracker.setCustomIdentifier("CUSTOM_IDENTIFIER").catchError((error)

Set custom email for events


This method sets a custom email in the parameters of every event.

You can pass a custom email to match your customers in our database.

Declared In:
lib/modules/tracker/tracker_impl.dart

Class:
TrackerImpl

Declaration:

void setCustomEmail(String customEmail)

Parameters:

Parameter Type Mandatory Default Description
email String yes - Customer’s custom email

Return Value:
No value is returned.

Example:

await Synerise.tracker.setCustomEmail("CUSTOM_EMAIL").catchError((error)

Send event


This method sends an event.

WARNING:

DO NOT send transaction.charge events as custom events.
Transactions must be tracked with these endpoints:

Note:
  • The tracker caches and enqueues all your events locally, so they all will be sent eventually.
  • The API key must have the API_BATCH_EVENTS_CREATE permission from the Events group.

Declared In:
lib/modules/tracker/tracker_impl.dart

Related To:
Event
CustomEvent

Class:
TrackerImpl

Declaration:

void send(Event event)

Parameters:

Parameter Type Mandatory Default Description
event Event yes - Event object

Return Value:
No value is returned.

Example:

final paramMap = <String, String>{"firstKeyCustomParam": "TEST"};
CustomEvent event = CustomEvent("label", "flutter", paramMap);
await Synerise.tracker.send(event).catchError((error)

Flush events from Tracker


This method forces sending the events from the queue to the server.

Note: The API key must have the API_BATCH_EVENTS_CREATE permission from the Events group.

Declared In:
lib/modules/tracker/tracker_impl.dart

Related To:
Event
CustomEvent

Class:
TrackerImpl

Declaration:

void flush()

Return Value:
No value is returned.

Example:

await Synerise.tracker.flush().catchError((error)

😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker