Learn how to create and edit a recommendation strategy, and define the settings for the strategy.
To get started, watch the following tutorial on how to create and use a simple recommendation strategy.
To create a recommendation strategy:
Define the recommendation strategy settings.
You can now use the strategy in a modification to build and display a recommendation.
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:
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.
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 | |
Select the type of page on which the recommendation is displayed. The page type determines the available algorithms. The available page types are:
| Required | ||
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 selected item and slot number of a fixed item. Removing a fixed itemTo remove a fixed item, click ✕ for the item. | Optional | ||
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 ✕ for the algorithm. | Optional | ||
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 ✕ 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 | ||
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: Affinity. | Required |
Figure: Defining the recommendation strategy settings (click to enlarge)
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 |
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:
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 ✕ for the rule. | Required |
Here are some examples showing how to create filters with different operators and how those filters get evaluated:
type: "Books" -> TRUE type: "BOOKS" -> TRUE type: "books" -> TRUE type: "Book" -> FALSE type: "Magazines" -> FALSE |
type: "Books", company: "Random House" -> TRUE type: "Books", company: "Vanity Press" -> FALSE type: "Magazines", company: "Random House" -> FALSE |
type: "Books", price: 29.99 -> TRUE type: "Books", price: 39.99 -> FALSE type: "Magazines", price: 19.99 -> FALSE |
name: "Cheetah Plushy" -> TRUE name: "Living with cheetahs, as told by a cheetah lover" -> TRUE name: "Operation C.H.E.E.T.A.H." -> FALSE |
name: "Cheetah Plushy" -> FALSE name: "Living with cheetahs, as told by a cheetah lover" -> FALSE name: "Operation C.H.E.E.T.A.H." -> TRUE |
type: "Movies", name: "Aliens" -> TRUE type: "Movies", name: "aliens" -> TRUE type: "Movies", name: "Tenet" -> FALSE type: "Movie", name: "Argo" -> FALSE |
type: "Books", name: "JavaScript For Dummies", price: 29.99 -> TRUE type: "Books", name: "Windows 10 For Dummies", price: 39.99 -> FALSE type: "Books", name: "The Complete Idiot's Guide to JavaScript", price: 19.99 -> FALSE |
type: "Hotel", city: "Cairo" -> TRUE type: "Hotels", city: "Kochi" -> TRUE type: "Hotels", city: "LaPaz" -> FALSE |
mainCategory: "Beach Volleyball", country: "Finland", city: "Helsinki" -> TRUE mainCategory: "Beach Volleyball", country: "Finland", city: "Tampere" -> FALSE mainCategory: "BVB", country: "Finland", city: "Turuku" -> TRUE |
type: "Movies", name: "Aliens" -> TRUE type: "Movies", name: "aliens" -> TRUE type: "Movies", name: "Tenet" -> FALSE type: "Movies", name: "Babe" -> TRUE type: "Movie", name: "A Clockwork Orange" -> FALSE |
categories: ["jackpot", "slots"] -> TRUE categories: ["jackpot", "slot"] -> FALSE categories: ["poker", "stud"] -> FALSE |
categories: ["jackpot", "slots"] -> TRUE categories: ["JACKPOT", "slot"] -> TRUE categories: ["blackjack", "cards"] -> TRUE |
categories: ["jackpot", "slots"] -> TRUE categories: ["jackpot", "slot"] -> TRUE categories: ["poker", "stud"] -> FALSE |
If the current time is: 2022-01-20 18:00:00 UTC+2 created_at: 2022-01-19T09:53:31+02:00 -> FALSE created_at: 2022-01-20T13:23:03+02:00 -> TRUE |
If the current time is: 2022-01-20 18:00:00 UTC+2 updated_at: 2021-11-11T00:03:54+02:00 -> TRUE updated_at: 2022-01-20T14:52:16+02:00 -> FALSE |
("name" attribute not found) -> TRUE name: undefined -> TRUE name: null -> TRUE name: "" -> TRUE name: "Aliens" -> FALSE |
The platform supports the RE2 syntax for regular expressions. |
type: "Movies", name: "Aliens" -> TRUE type: "Movies", name: "aliens" -> TRUE type: "Movies", name: "ALIENS" -> FALSE type: "Movies", name: "Alien" -> FALSE |