This example shows you how to create a recommendation for the most popular items in the past 7 days based on visitor affinity. The recommendation comes in two competing variations that each use a different level of affinity. This allows you to test which level of affinity performs better over time. The example assumes that the site already has the necessary recommendation template and placement set up and ready to use, so you'll only be creating the strategies and modification for the recommendation.
In this example, you:
- Create two recommendation strategies for the top 10 most popular items on the site based on visitor affinity. The most popular items comprise (a) the top 5 most viewed items on the site in the past 24 hours and (b) the top 5 most purchased items on the site in the past 7 days. The two strategies differ only in that one uses 50% affinity, while the other uses 100% affinity. The strategies do not use fixed items or filters.
- Create a modification for displaying the recommendation on the site home page. The modification is a multi-armed bandit modification with 2 variations, one for each strategy. The variations use a recommendation slider template that includes a strategy selector.
You create the recommendation strategies and modification in the Frosmo Control Panel.
The following figure shows an example of the final recommendation on the home page. The set of recommended items is different for each visitor based on their specific affinities.
Figure: Home page with a recommendation for the most popular items for the current visitor (click to enlarge)
To create the recommendation:
Creating the recommendation strategies
Both recommendation strategies return up to 5 items most often viewed on the site in the past 24 hours and up to 5 items most often purchased on the site in the past 7 days. The strategies rerank the items based on visitor affinity. The strategies do not define fixed items or filters.
To create the first recommendation strategy:
- In the Frosmo Control Panel, in the sidebar, select More > Recommendations.
- Click Create recommendation strategy.
Define the following settings:
- Name: Enter "Most popular on site with half affinity". Note that the ID automatically completes to "most-popular-on-site-with-half-affinity".
- Page type: Select Home.
- Algorithms: Select the following algorithms (in order):
- Most viewed on the site in the past 24 hours, 5 items
- Most bought on the site in recent days, 5 items
- Affinity: Set the slider to half-way (50%). This means that a visitor's affinity for an item counts for 50% of the item's final recommendation ranking. The algorithm determines the other 50%.
The following figure shows the complete recommendation strategy in the Control Panel. Click the figure to view a larger version.
For more information about the settings, see Creating and editing a recommendation strategy.
- Click Save. The Frosmo Platform generates the recommendation data for the new strategy. The data generation may take several minutes.
- Optionally, in the Preview section, review the items returned by the strategy. The preview shows the recommendation results without any affinity applied.
To create the second recommendation strategy, repeat the above steps, but:
- In the Name field, enter "Most popular on site with full affinity".
- Set Affinity to full affinity applied (100%). This means that a visitor's affinity for an item counts for 100% of the item's final recommendation ranking. The strategy ignores how the algorithm ranks the item.
You have created the recommendation strategies. You can now use their recommendation data in a modification.
Creating the recommendation modification
For example purposes, let's assume you have the following predefined in the Control Panel:
- Placement for a home page recommendation
- Template for a recommendation slider with two content options: title and recommendation strategy selector
To create and activate the recommendation modification:
- In the Control Panel, in the sidebar, select Modifications.
- Click Create modification.
Enter "Home page - Recommendation - Most popular for visitor" as the modification name, select Multi-armed bandit as the modification case, and click Create.
For more information about the settings, see Creating and editing a modification.
Select the placement for the modification:
In the Basic settings view, in the Placement section, click Select placement.
Select the predefined placement for a home page recommendation. In this example, the placement is Home page - Recommendation 1.
- Click Save.
For more information about the settings, see Defining the placement for a modification.
Define the content for the modification:
In the Basic settings view, in the Content section, click Create variation.
- In the Variation settings section, click Select type.
In the Content templates list, select the predefined template for a recommendation slider, and click Select. In this example, the template is Recommendation slider.
In the Content options section, enter an appropriate title for the recommendation, such as "Most popular for you", and select [Home] Most popular on site with half affinity as the recommendation strategy.
- At the bottom of the view, click Save.
Back in the Content section, click the quick menu button for the variation, and select Activate.
- Repeat the above steps to create the second variation, but select [Home] Most popular on site with full affinity as the recommendation strategy.
Back in the Content section, click Define distribution.
Select Click as the reward, select Epsilon-greedy or Softmax as the algorithm, and click Save. Both algorithms will always leave some distribution for the losing variation, meaning the variation will always be displayed to some portion of visitors. This allows the losing variation and the winning variation to swap places if the former starts outperforming the latter.
- Back in the Content section, if you want to disable the comparison group for the modification, click the quick menu button for the group, and select Deactivate.
For more information about the settings, see Defining the content for a modification.
- Activate the modification:
- At the bottom of the Basic settings view, click Activate.
- To confirm, click Activate.
You have created and activated the modification. The recommendation is now live, and you're done with this example!