Prompt
How do I make recommendations work across web and app?
Latest observation
To make recommendations work well across both web and app, aim for one recommendation system with shared data, identity, and APIs, then adapt the presentation per surface.
1) Use a common recommendation backend
Build recommendations in a central service rather than separately for web and app.
- One model / ranking service
- One feature store or user profile store
- One API that both clients call
- Surface-specific UI only at the last step
This keeps behavior consistent and avoids duplicated logic.
2) Unify identity
The hardest part is knowing the same user across devices.
Use:
- Logged-in user ID as the primary identity
- Anonymous/session ID before login
- Identity stitching when a user signs in on web or app
Best practice:
- Capture anonymous activity
- Link it to the account after authentication
- Merge history carefully to avoid duplicate signals
3) Track the same events on both platforms
Make sure web and app send the same core events with the same schema.
Common events:
view_itemsearchadd_to_cartpurchaselike/saveclick_recommendation
Keep event names, properties, and timestamps consistent.
Example properties:
- user_id / anonymous_id
- item_id
- category
- price
- device_type
- platform:
weboriosorandroid - session_id
4) Normalize item catalog data
Recommendations usually depend on item metadata.
Make sure web and app use the same:
- Product IDs
- Titles
- Categories
- Availability / inventory
- Pricing
- Locale/currency
If item IDs differ by platform, unify them in a mapping layer.
5) Return platform-aware recommendations
The backend can stay shared, but outputs may need adjustment depending on surface.
Examples:
- App may prioritize shorter lists and faster-loading results
- Web may support richer explanations or more items
- Different ranking rules for home screen vs product page
- Exclude items not available on a given platform/region
6) Support real-time and batch signals
Use both:
- Batch signals for stable personalization
- Real-time signals for session intent
Example:
- Batch: past purchases, long-term interests
- Real-time: recent views, current search terms
This helps recommendations feel relevant on both web and app.
7) Test with cross-platform experiments
Run A/B tests consistently across both surfaces.
Good practices:
- Use the same experiment assignment across devices when possible
- Measure cross-device impact, not just single-session clicks
- Evaluate metrics like CTR, conversion, revenue, retention, and repeat visits
8) Handle cold start consistently
For new users or anonymous users:
- Use context: locale, device, referral source, trending items
- Use session behavior
- Use popular items in the user’s region/category
9) Keep privacy and consent aligned
Especially across web and app:
- Respect consent settings
- Honor opt-out/delete requests on all platforms
- Be careful with cross-device tracking and compliance requirements
10) Practical architecture
A simple setup looks like this:
- Web/app app sends events to analytics pipeline
- Identity service links anonymous and logged-in users
- Feature store aggregates user/item/context signals
- Recommendation service scores candidate items
- Web/app render the returned results in their own UI
If you want, I can also give you:
- a reference architecture,
- a data schema for cross-platform tracking, or
- a checklist for launching recommendations on web + app.