Event tracking
Set custom identifier for events
You can pass a custom identifier to match your customers in our database. The custom identifier is sent in the parameters of every event.
Declared In
lib/modules/tracker/tracker_impl.dart
Method
void setCustomIdentifier(String customIdentifier)
Parameters
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
identifier |
String |
yes | - | Customer’s custom identifier |
Return Value
There is no return value.
Example
await Synerise.tracker.setCustomIdentifier("CUSTOM_IDENTIFIER").catchError((error)
Set custom email for events
You can pass a custom email to match your customers in our database. The custom email is sent in the parameters of every event.
Declared In
lib/modules/tracker/tracker_impl.dart
Method
void setCustomEmail(String customEmail)
Parameters
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
email |
String |
yes | - | Customer’s custom email |
Return Value
There is no return value.
Example
await Synerise.tracker.setCustomEmail("CUSTOM_EMAIL").catchError((error)
Send event
Use this method to send an event.
The tracker caches and enqueues all your events locally, so they all will be sent eventually.
Declared In
lib/modules/tracker/tracker_impl.dart
Related
lib/model/tracker/event.dart
lib/model/tracker/custom_event.dart
Method
void send(Event event)
Parameters
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
event |
Event |
yes | - | Event object |
Return Value
There is no return value.
Example
final paramMap = <String, String>{"firstKeyCustomParam": "TEST"};
CustomEvent event = CustomEvent("label", "flutter", paramMap);
await Synerise.tracker.send(event).catchError((error)
Flush events from Tracker
Forces sending the events from the queue to the server. This method is a global operation and does not require authorization.
Declared In
lib/modules/tracker/tracker_impl.dart
Method
void flush()
Return Value
There is no return value.
Example
await Synerise.tracker.flush().catchError((error)