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/main/modules/TrackerModule.js

Method

Synerise.Tracker.setCustomIdentifier(identifier)

Parameters

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

Return Value

There is no return value.

Example

Synerise.Tracker.setCustomIdentifier("CUSTOM_IDENTIFIER");

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/main/modules/TrackerModule.js

Method

Synerise.Tracker.setCustomEmail(customEmail)

Parameters

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

Return Value

There is no return value.

Example

Synerise.Tracker.setCustomEmail("CUSTOM_EMAIL");

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/main/modules/TrackerModule.js

lib/classes/events/Event.js
lib/classes/events/CustomEvent.js

Method

Synerise.Tracker.send(event)

Parameters

Parameter Type Mandatory Default Description
event Event yes - Event object

Return Value

There is no return value.

Example

let parameters = {
  "name": "John",
  "surname": "Rise",
  "company": "Synerise",
  "age": 25,
  "lastOrder": 380.50
};

let event = new CustomEvent("My label that will be visible on Activity Stream", "my.action", parameters);
Synerise.Tracker.send(event);

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/main/modules/TrackerModule.js

Method

Synerise.Tracker.flushEvents(onSuccess)

Parameters

Parameter Type Mandatory Default Description
onSuccess function no - Callback function to be executed when the operation finishes successfully

Return Value

There is no return value.

Example

Synerise.Tracker.flushEvents(function() {
	// success
});
😕

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