Popular & Trending
Introduction
This scenario brings your users the hottest and most trending videos in real-time. From viral hits to rising stars, your users can immerse themselves in a dynamic selection that reflects the pulse of the video community.
Scenario Setup
In the Recombee Admin UI, navigate to the Scenarios section and choose Create Scenario.
- Enter a Scenario ID, such as "popular-movies-and-series"
- Choose Recommendation type - Items to User
Logic
The Logic defines the behavior of the recommendation engine.
- Choose the video:popular logic type from the Video models to get the popular assets among the users
The timePeriod
specifies the time period in which the the popularity is measured. Therefore you can have e.g. Popular This Month by setting the parameter to 30 days, or get recently trending content by setting the parameter to 7 days.
More advanced use cases such as Popular in Your Country can be achieved by setting the userSegmentFilter
parameter, which specifies which users will be considered when computing the popularity.
The parameter accepts a ReQL filter on top of the user properties - only the users that pass the filter will considered. Assuming that the users have a property called country and you want to recommend assets popular in the particular user’s country, the parameter shall be set to ‘country’ == context_user[“country”]
.
The assetType
parameter specifies what type of assets will be returned (e.g. movies, series, episodes, movies and episodes, etc.).
Filters
Boosters
Constraints
Diversify the genres of recommended assets
You may want to show the user popular content from various genres, preventing the situation when all the content is from the same category, and may not attract the user.
In order to do this, navigate to the Constraints tab of the Scenario, and add a new Constraint.
The Constraint will be based on an Item Segmentation that splits the items by their genre. If you already have such Segmentation and you can pick it from the list, otherwise, you can create a new Segmentation based on the property that specifies the genre of the assets.
Now you can specify the limit and allow e.g. up to 3 assets from a single genre, or up to 50 % (with Limit
type set to percentage) of the recommended items in the row to be of a single genre.
Requesting Recommendations
There are two ways to get recommendations.
- HTML Widget - create an HTML Widget using the visual editor in the Admin UI.
- API & SDK - request the Recommend Items to User endpoint of the Recombee API using an SDK of your choice.
For more information navigate to the Integration tab of the Scenario in the Admin UI.
In order to request content for multiple rows with a single API request, use the Batch endpoint and put the recommendation requests inside it. Set the parameter distinctRecomms
in order to deduplicate the assets among the rows.