Create an event tracker in your dataset group via CreateEventTracker; save the returned trackingId — you must pass this in every PutEvents call.
On your storefront, instrument user interactions: call personalizeevents.PutEvents with trackingId, userId (or anonymousId for unauth users), sessionId, and an eventList containing Event objects (each with eventType such as 'ProductDetailViewed' or 'AddedToCart', itemId, and sentAt timestamp).
For anonymous users, use a stable first-party visitorId as the userId; when the user logs in, link the anonymous visitorId to the authenticated userId by passing both in subsequent PutEvents calls so interaction history merges.
PutEvents is asynchronous and writes to the Interactions dataset for the next model retrain, but for recipes supporting real-time personalization (User-Personalization-v2, Recommended-For-You) the events influence the next GetRecommendations call within seconds.
Do not call PutEvents more than the API's request rate limit allows per region; implement client-side batching by accumulating events and flushing every few seconds rather than sending one call per user action.
Known gotchas
PutEvents does not return the item in the dataset immediately — it is persisted asynchronously. Verify event ingestion by checking the Personalize console dataset metrics, not by re-querying the dataset directly.
Events sent with an unrecognised eventType are silently discarded for model training; use only event types defined by the e-commerce domain schema (e.g., 'ProductDetailViewed', 'Purchase') to ensure they are used in model training.
The event tracker is coupled to a specific dataset group; you cannot reuse the same trackingId across different dataset groups or regions.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp