Learn how to create and edit a recommendation strategy, and define the settings for the strategy.
Quick start
To get started, watch the following tutorial on how to create and use a simple recommendation strategy.
Creating a recommendation strategy
To create a recommendation strategy:
- In the Frosmo Control Panel, select Data Management > Recommendations > Strategies.
- Click Create recommendation strategy.
Define the recommendation strategy settings.
- When you're done, click Save. The Frosmo Platform generates the recommendation data for the new strategy. The data generation may take several minutes.
- Once the recommendation data has been successfully generated, preview the data.
- To return to the recommendation strategies list, click Cancel.
You can now use the strategy in a modification to build and display a recommendation.
Editing a recommendation strategy
Be careful when editing a recommendation strategy that is in use, since changes to the strategy affect all modifications that use it. In particular, if you edit a strategy that is currently used in an active variation of an active modification, the changes will affect all visitors who see the variation content.
If you want to make major changes to a strategy, such as change its algorithms or filters, it is recommended that you first duplicate the strategy and associated modification, test the changes with the duplicates, and update the original strategy only after you're happy with how its duplicate works.
To edit a recommendation strategy:
- In the Frosmo Control Panel, select Data Management > Recommendations > Strategies.
- In the recommendation strategies list, find the strategy you want to edit, and click its name.
- Edit the recommendation strategy settings.
- When you're done, click Save. The Frosmo Platform regenerates the recommendation data for the updated strategy. The data generation may take several minutes.
- Once the recommendation data has been successfully generated, preview the data.
- To return to the recommendation strategies list, click Cancel.
Previewing the recommendation data of a strategy
The preview does not work for algorithms that rely on data about the current visitor's behavior, such as Most viewed by the visitor and Recently viewed by the visitor.
The platform automatically regenerates the recommendation data at regular time intervals. The exact regeneration frequency depends on the algorithms used by a strategy.
To preview the latest recommendation data generated for a strategy, in the strategy settings, scroll to the Preview section, and view the recommendation results.
The preview displays the recommended items in slot order, that is, in the order in which the items are recommended to visitors. The preview also displays selected information, such as ID and name, for each item.
If the strategy relies on a target category or item against which to generate recommendations, enter the name of a category or item, and click Show. The name must be the exact full name tracked for the category or item by the Frosmo Platform.
If you edit the strategy, you need to regenerate the recommendation data to preview it. To regenerate the data, click Save and generate.
Recommendation strategy settings
The following table describes the settings you can define for a recommendation strategy in the Control Panel.
Table: Recommendation strategy settings
Setting | Description | Role |
---|---|---|
Name | Enter a name for the strategy. | Required |
ID | The Control Panel automatically generates a unique ID for the strategy based on the name. You can edit the ID when you create a new strategy, but only until you save the strategy for the first time. Once you save the strategy, the ID becomes non-editable. | Required |
Description | Enter a description for the strategy. You can use the description to, for example, explain what sort of recommendation the strategy generates. | Optional |
Page type | Select the type of page on which the recommendation is displayed. The page type determines the available algorithms. The available page types are:
| Required |
Fixed items | Define the items that are always included ("fixed") in the recommendation. If a fixed item also appears in the results generated by an algorithm, the platform automatically removes the duplicate from the final set of items returned by the strategy. Adding a fixed itemTo add a fixed item:
Editing a fixed itemYou can change the ID and slot number of a fixed item. Removing a fixed itemTo remove a fixed item, click X for the item. | Optional |
Algorithms | Select the algorithms for the strategy. The algorithms together determine the dynamically generated set of items returned by the strategy. The strategy must include at least one algorithm. You can select a maximum of five algorithms. A new strategy includes a single preselected algorithm, which you can change. How algorithms workThe platform runs each algorithm separately against the same source usage data and combines the results from the algorithms in the order in which the algorithms are selected. For example, if you have Bought together with current item - 60 days with 5 items as your first algorithm and Viewed together with current item - 30 days with 3 items as your second algorithm, the strategy returns a total of eight items, the first five generated by the former algorithm and the remaining three generated by the latter algorithm. The platform automatically reruns the algorithms at regular time intervals, thereby periodically regenerating the recommendation data returned by the strategy. The platform reruns each algorithm separately based on its regeneration frequency. If you select multiple algorithms with different regeneration frequencies, some parts of the data returned by the strategy will be updated more frequently than other parts. To find out the frequency of an algorithm, see Supported algorithms. Adding an algorithmTo add an algorithm:
Changing an algorithmYou can change the selected algorithm and the maximum number of items returned by the algorithm. Removing an algorithmTo remove an algorithm, click X for the algorithm. If the strategy has only one algorithm, the algorithm does not show an X, meaning you cannot remove the algorithm. | Required |
Filters | Create filters to further refine the set of items returned by the strategy. The filters are applied to the combined results from the selected algorithms. You can use filters only with product recommendations. Limiting the results to the viewed categoryIf the Page type of the strategy is category, and if you only want to return items that belong to the category currently viewed by the visitor, select Only include items that match the viewed category. If the Page type of the strategy is product, and if you only want to return items that belong to the same category as the item currently viewed by the visitor, select Only include items that match the category of the viewed item. This setting applies even if you do not define any filters for the strategy. Adding a filterTo add a filter:
Editing a filterTo edit a filter:
Removing a filterTo remove a filter, click X for the filter. | Optional |
Figure: Defining the recommendation strategy settings (click to enlarge)
Supported algorithms
The following table describes the algorithms you can use in a recommendation strategy. The table also shows for which page types an algorithm is valid and how often the recommendation data returned by the algorithms is automatically regenerated.
Table: Supported algorithms
Algorithm | Description | Page type | Regeneration |
---|---|---|---|
Bought together with categories recently bought by the visitor - 60 days | Returns items bought together (within the past 60 days) with the items the visitor has recently bought (within the past 7 days). The returned items are from the same category or categories as the items bought by the visitor. ExampleThe visitor recently bought the following items:
The algorithm returns items from categories X and Y that visitors have commonly bought together with items A and B. | All | 1 day |
Bought together with current category - 60 days | Returns items bought together (within the past 60 days) with items from the category the visitor is currently viewing. | Category | 1 day |
Bought together with current item - 60 days | Returns items bought together (within the past 60 days) with the item the visitor is currently viewing. | Product | 1 day |
Bought together with item added to cart - 60 days | Returns items bought together (within the past 60 days) with the item the visitor added to their shopping cart. | Cart | 1 day |
Bought together with items recently viewed by the visitor - 60 days | Returns items bought together (within the past 60 days) with the items the visitor has recently viewed (within the past 7 days). | All | 1 day |
Most bought on the site - 1 day | Returns the most bought items on the site within the past 24 hours. | All | 1 hour |
Most bought on the site - 7 days | Returns the most bought items on the site within the past 7 days. | All | 1 day |
Most viewed by the visitor | Returns items the visitor has viewed the most within the past 7 days. | All | 1 day |
Most viewed on the site - 1 day | Returns the most viewed items on the site within the past 24 hours. | All | 1 hour |
Most viewed on the site - 30 days | Returns the most viewed items on the site within the past 30 days. | All | 1 day |
Recently viewed by the visitor | Returns items the visitor has viewed within the past 7 days. | All | 1 day |
Viewed together with categories recently viewed by the visitor - 30 days | Returns items viewed together (within the past 30 days) with the items the visitor has recently viewed (within the past 7 days). The returned items are from the same category or categories as the items viewed by the visitor. ExampleThe visitor recently viewed the following items:
The algorithm returns items from categories X and Y that visitors have commonly viewed together with items A and B. | All | 1 day |
Viewed together with current category - 30 days | Returns items viewed together (within the past 30 days) with items from the category the visitor is currently viewing. | Category | 1 day |
Viewed together with current item - 30 days | Returns items viewed together (within the past 30 days) with the item the visitor is currently viewing. | Product | 1 day |
Viewed together with items recently viewed by the visitor - 30 days | Returns items viewed together (within the past 30 days) with the items the visitor has recently viewed (within the past 7 days). | All | 1 day |
Viewed together with recently searched categories - 30 days | Returns items viewed together (within the past 30 days) with items from the three categories that feature most in the visitor's current search results. ExampleThe visitors current search returns 20 items:
The algorithm returns items that visitors have commonly viewed together with items from categories C, B, and E. | Search | 1 day |
Viewed together with recently searched items - 30 days | Returns items viewed together (within the past 30 days) with the top three items in the visitor's current search results. | Search | 1 day |
Filter settings
The following table describes the settings you can define for a recommendation strategy filter in the Control Panel. A filter defines a single rule set for filtering recommended items.
Table: Filter settings
Setting | Description | Role |
---|---|---|
Name | Enter a name for the filter. | Required |
Rules | Create one or more rules that together define the filtering logic for the filter. A rule defines a single comparison operation between an item attribute value and a target value defined by you. The rule is used to include and exclude items from the final recommendation results: any item for which the rule evaluates to true is included, while any item for which the rule evaluates to false is excluded. The comparison is case insensitive. If you create multiple rules, the platform applies them all, that is, the platform treats the rules as combined with logical AND operators. The platform only returns items for whom all the rules evaluate to true. The filter must include at least one rule. A new filter includes a single empty rule, which you can edit. ExampleIf you wanted to exclude items that cost more than 100 in your site currency, you would filter for items whose price attribute value was less than or equal to 100, which would give you the rule: price is less than or equal to 100 The platform would then evaluate every item in the algorithm results and remove any item for which the rule evaluates to false. The final recommendation results returned by the strategy would thus exclude these items. For example: # Set of items returned by the algorithms Item 1, price: 100 Item 2, price: 500 Item 3, price: 30 # Filter evaluation Item 1, price: 100 -> TRUE Item 2, price: 500 -> FALSE Item 3, price: 30 -> TRUE # Set of items returned by the strategy after applying the filter Item 1, price: 100 Item 3, price: 30 For more examples, see Filter examples. Adding a ruleTo add a rule:
Editing a ruleYou can change the attribute, operator, and value of a rule. Removing a ruleTo remove a rule, click X for the rule. | Required |
Filter examples
Here are some examples showing how to create filters with different operators and how those filters get evaluated:
Filter examples: equals, less than, greater than
Return all items from the category "Books"
Return all items from the category "Books", except ones from a specific company
Return books that cost less than 30 currency
Filter examples: contains, begins with, ends with
Return movies whose name starts with "A"
Return books whose title ends with "for dummies" and that cost less than 30 currency
Return items whose name contains "cheetah"
Return items whose name does not contain "cheetah"
Filter examples: is one of, begins with any one of
Return hotels located in Cairo, Kochi, or La Paz
Return beach volleyball events in Finland, except those in Tampere and Turku
Return items whose name starts with "A", "B", or "C"
Filter examples: includes, any one of begins/ends with
Return any item one whose categories is "slots"
Return any item one whose categories starts with "slot"
Filter examples: regular expressions
The platform supports the RE2 syntax for regular expressions.