The function "track"
The function angora.track ()
is one of the main functions of the SDK. It allows the monitoring of events. Using it is simple, in an event you want to monitor, call the function and pass two parameters:
- The first parameter (required) must be the event code;
- The second parameter (optional) must be an object containing the properties you want to monitor.
An example of using the track function is:
angora.track('app:store:add_to_cart', { productId: '5e8403d88411206e26279729' });
...
angora.track('web:ads:use_promo', { promoCode: 'VIP10' });
...
angora.track('app:objects_table:edit', { objectId: '5e8403d88411206e26279729' });
...
angora.track('web:store_list:search', { searchText: 'celular' });
As soon as the user performs the action responsible for calling this function, the data will be made available in the workspace and project related to the event.