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. You might even consider switching to using the duplicate strategy, while leaving the original unchanged. This way, you can always revert back to the original strategy, if necessary.
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. In addition, the preview does not account for affinity, as that, too, relies on data about the current 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 (when not adjusted for affinity). The preview also displays selected information, such as ID and name, for each item. Finally, the preview provides two links for each item: one to the item details page in the Frosmo Control Panel, and the other to the item page on the site, such as a product page.
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 Frosmo 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. You must at minimum define either one algorithm or one fixed item for the strategy. 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. You can further refine the set by applying filters and affinity. You must at minimum define either one algorithm or one fixed item for the strategy. 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 items are the top five items from the former algorithm and the remaining three items are the top three items from 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. | Optional |
Filters | Create filters to further refine the set of items returned by the strategy. You can also apply predefined filters available to certain page types The platform applies the filters separately to the full results of each algorithm, removing items based on the filter settings. The platform then picks the top items for each algorithm, and combines the top items and any fixed items into the final set of recommended items returned by 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. 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 return items whose type matches the viewed category or Only return items whose categories include the viewed category, or both. Your selection depends on whether item data for your site uses the If you select both options, the strategy only returns items that pass both filters. Limiting the results to the viewed item's categoriesIf the Page type of the strategy is product, and if you only want to return items that belong to the same category or categories as the item currently viewed by the visitor, select Only return items whose type is the same as the viewed item's or Only return items whose categories include at least one category to which the viewed item belongs, or both. Your selection depends on whether item data for your site uses the If you select both options, the strategy only returns items that pass both filters. Limiting the results to searched categoriesIf the Page type of the strategy is search, and if you only want to return items that belong to the same category or categories as the items returned by the search, select Only return items whose type matches a searched category or Only return items whose categories include a searched category, or both. Your selection depends on whether item data for your site uses the If you select both options, the strategy only returns items that pass both filters. | Optional |
Affinity | Set the level of visitor affinity applied to the recommendation. The higher the level, the more personalized the set of recommended items is for each individual visitor. The platform applies affinity separately to the full results of each algorithm, after first applying filters to the results. Applying affinity reorders (reranks) the items to a greater or lesser degree depending on the level of affinity selected and how closely a given visitor's affinities match the algorithm results. The possible slider values are:
If a visitor's affinity is not known, the platform does not apply any affinity to the recommendation for that visitor. For more information about affinity and how it works, see Feature: Super-Affinity. | Required |
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 | Returns items bought together (by default, in the past 60 days) with the items the visitor has recently bought (by default, in 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 | Returns items bought together (by default, in the past 60 days) with items from the category the visitor is currently viewing. | Category | 1 day |
Bought together with current item | Returns items bought together (by default, in the past 60 days) with the item the visitor is currently viewing. | Product | 1 day |
Bought together with item added to cart | Returns items bought together (by default, in 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 | Returns items bought together (by default, in the past 60 days) with the items the visitor has recently viewed (by default, in the past 7 days). | All | 1 day |
Most bought on the site in the past 24 hours | Returns the most bought items on the site in the past 24 hours. | All | 1 hour |
Most bought on the site in recent days | Returns the most bought items on the site in, by default, the past 7 days. | All | 1 day |
Most bought on the site in recent months | Returns the most bought items on the site in, by default, the past 60 days. | All | 1 day |
Most viewed by the visitor | Returns items the visitor has viewed the most in, by default, the past 7 days. | All | 1 day |
Most viewed on the site in the past 24 hours | Returns the most viewed items on the site in the past 24 hours. | All | 1 hour |
Most viewed on the site in recent weeks | Returns the most viewed items on the site in, by default, the past 30 days. | All | 1 day |
Recently viewed by the visitor | Returns items the visitor has viewed in, by default, the past 7 days. | All | 1 day |
Viewed together with categories recently viewed by the visitor | Returns items viewed together (by default, in the past 30 days) with the items the visitor has recently viewed (by default, in 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 | Returns items viewed together (by default, in the past 30 days) with items from the category the visitor is currently viewing. | Category | 1 day |
Viewed together with current item | Returns items viewed together (by default, in the past 30 days) with the item the visitor is currently viewing. | Product | 1 day |
Viewed together with items recently viewed by the visitor | Returns items viewed together (by default, in the past 30 days) with the items the visitor has recently viewed (by default, in the past 7 days). | All | 1 day |
Viewed together with recently searched categories | Returns items viewed together (by default, in 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 | Returns items viewed together (by default, in 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 items whose name contains "cheetah"
Return items whose name does not contain "cheetah"
Return movies whose name starts with "A"
Return movies whose name starts with "A", "B", or "C"
Return books whose title ends with "for dummies" and that cost less than 30 currency
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
Filter examples: includes, any one of contains/begins with/ends with
Return any item one whose categories is "slots"
Return any item one whose categories contains "jack"
Return any item one whose categories starts with "slot"
Filter examples: during, not during
Return items that have been created in the past 24 hours
Return items that have not been updated in the past 30 days
Filter examples: exists, does not exist
Return items without a name (either the name attribute is missing or the attribute has an empty value)
Filter examples: regular expressions
The platform supports the RE2 syntax for regular expressions.