Retention Event
Send retention events
Use RetentionData
and AppEvent
to send a retention event whenever the user opens the app.
Send this event:
- After initial registration
- On each subsequent app open
import { RetentionData, AppEvent } from "audiencelab_nodejs_sdk";
const retentionEventData = new RetentionData().setRetentionData(userData);
const retentionEvent = new AppEvent(client, retentionEventData, userData);
await retentionEvent.send().catch((error) => {
console.error("Error sending retention event:", error);
});
Retention events help measure user engagement across sessions.