Skip to content

PutEvents

Source: src/AWS/Personalize/PutEvents.ts

Runtime binding for personalize:PutEvents, scoped to one EventTracker — Records item-interaction events (clicks, views, purchases, …) in real time through the bound EventTracker. Events stream into the dataset group’s Interactions dataset and are used by recommenders as they happen. Provide the implementation with Effect.provide(AWS.Personalize.PutEventsHttp).

// init
const putEvents = yield* Personalize.PutEvents(tracker);
yield* putEvents({
sessionId: "session-1",
userId: "user-1",
eventList: [{ eventType: "click", itemId: "item-42", sentAt: new Date() }],
});