What You’ll Build
Prerequisites
Step 1: Fetch Products for the Stack
Load products from the agentic product feed, personalized if you have a user ID.Step 2: Swipe Card Component
Each card is a full-bleed product image with name and price. Swipe right = interested, left = skip.Step 3: Record Swipe Interactions
Every swipe is an intent signal. Record it through the companion API and award points.Step 4: Widget Shell with postMessage
The widget communicates with the parent frame viapostMessage — reporting completion, swipe counts, and any purchase intent.
Step 5: Embed on Any Site
Build and host the widget, then embed it anywhere with a single iframe.Listen for Completion on the Parent
Step 6: Campaign Integration
Tie the swipe widget to a campaign for structured engagement tracking.Architecture Notes
- No auth required for anonymous users — the widget works without a
userId, using the general product feed instead of personalized recommendations - Points only award for authenticated users — anonymous swipes still capture aggregate signals
- postMessage API — keeps the widget decoupled from the host site; no shared state or cookies needed
- Campaign tracking — optional but recommended for measuring engagement across different embed locations
Related
- Agentic Product Feed — the discovery API powering the card stack
- Companion API — interaction recording and recommendations
- Campaigns API — structured engagement tracking
- Points API — points award and balance

