Skip to main content

Overview

User recommendations provide the deepest level of personalization by leveraging a user’s full purchase and browsing history across sessions and devices. Requires calling refine.identify() with your user ID.

Basic Usage

Parameters

string
required
Recommendation configuration ID from the dashboard.
number
required
Number of recommendations to return.
Filter[]
Additional filters to apply. See Filters.

User Identification

Before requesting user recommendations, you must identify the user:
If you call forUser() without first calling identify(), the request will fail with a validation error.

Identity Flow

Check Current Identity

User vs Visitor Recommendations

Tracking User Recommendations

With Filters

Complete Implementation

Handling Logout

When a user logs out, reset the identity:

Email/Marketing Recommendations

Generate recommendations for email campaigns:

Fallback Strategy

Handle new users with minimal history:

Next Steps

Identity Management

Full identity documentation

Event Tracking

Track user interactions