Track Custom Events
RetenoPlugin.logEvent({
eventName: 'EVENT_NAME',
date: new Date().toISOString(), // optional ISO8601
parameters: [
{ name: 'Additional parameter', value: 'Additional value' },
],
})
.then(() => console.log('logEvent: OK'))
.catch((err) => console.error('logEvent: ERROR', err));Parameter item type:
type CustomEventParameter = {
name: string;
value?: string;
};Force Push Cached Data
Reteno caches events locally. Use forcePushData to sync immediately:
RetenoPlugin.forcePushData()
.then(() => console.log('forcePushData: OK'))
.catch((err) => console.error('forcePushData: ERROR', err));On iOS this uses a technical logEvent(..., forcePush: true) call under the hood.
Log Screen View Events
For Cordova/WebView apps, manual screen tracking is recommended:
RetenoPlugin.logScreenView('HomeScreen')
.then(() => console.log('logScreenView: OK'))
.catch((err) => console.error('logScreenView: ERROR', err));Lifecycle Tracking Options
Lifecycle tracking configuration and examples are documented in:
