Pages

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:

  1. In the Frosmo Control Panel, select Data Management > Recommendations > Strategies.
  2. Click Create recommendation strategy.
  3. Define the recommendation strategy settings.

  4. When you're done, click Save. The Frosmo Platform generates the recommendation data for the new strategy. The data generation may take several minutes.
  5. Once the recommendation data has been successfully generated, preview the data.
  6. 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:

  1. In the Frosmo Control Panel, select Data Management > Recommendations > Strategies.
  2. In the recommendation strategies list, find the strategy you want to edit, and click its name.
  3. Edit the recommendation strategy settings.
  4. When you're done, click Save. The Frosmo Platform regenerates the recommendation data for the updated strategy. The data generation may take several minutes.
  5. Once the recommendation data has been successfully generated, preview the data.
  6. 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.

Previewing the recommendation data of a strategy

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.

Specifying the target category for the recommendation data preview

If you edit the strategy, you need to regenerate the recommendation data to preview it. To regenerate the data, click Save and generate.

Regenerating the recommendation data

Recommendation strategy settings

The following table describes the settings you can define for a recommendation strategy in the Control Panel.

Table: Recommendation strategy settings

SettingDescriptionRole
NameEnter 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
DescriptionEnter 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:

  • cart: Shopping cart page or other checkout funnel page.
  • category: Any page that displays information about multiple items belonging to the same group. For example: game category page, product category page
  • other: Any page that does not match the other types. For example: site home page, user profile page
  • product: Any page that displays detailed information about a single product or other item. For example: product page
  • search: Search results page.
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 item

To add a fixed item:

  1. Click Add item. The Control Panel adds an undefined item.
  2. In the empty field, enter or select the item ID. The field automatically lists items tracked for the site.

    Entering the item ID

  3. Enter the slot number for the item. The slot number determines the item's absolute position in the recommendation results. The position is not affected by algorithms, filters, or shuffling. For example, if you set the slot number to "1", the item is always displayed first in the recommendation. You cannot enter the same slot number for multiple items.

    Entering the slot number for the item

Editing a fixed item

You can change the ID and slot number of a fixed item.

Removing a fixed item

To remove a fixed item, click X for the item.

Removing a fixed 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.

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 work

The 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 algorithm

To add an algorithm:

  1. Click Add algorithm. The Control Panel adds an algorithm with default settings.
  2. Select the algorithm you want to use. For more information about the supported algorithms, see Supported algorithms.

    Selecting the algorithm

  3. Enter the maximum number of items returned by the algorithm. The algorithm will always return this many items, unless it cannot find enough items matching its criteria.

    Entering the maximum number of items returned by the algorithm

Changing an algorithm

You can change the selected algorithm and the maximum number of items returned by the algorithm.

Removing an algorithm

To 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 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.

Limiting the results to the viewed category

If 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 type (string) or categories (array of strings) attribute, or both, for storing category information.

If you select both options, the strategy only returns items whose type and categories attributes both match the currently viewed category. (The platform, in other words, treats the options as combined with a logical AND operator.)

Limiting the results to the viewed category

Limiting the results to the viewed item's categories

If 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 type (string) or categories (array of strings) attribute, or both, for storing category information.

If you select both options, the strategy only returns items whose type matches the currently viewed item's type and whose categories attribute contains at least one category also found in the currently viewed item's categories. (The platform, in other words, treats the options as combined with a logical AND operator.)

Limiting the results to the viewed item's categories

Adding a filter

To add a filter:

  1. Click Add filter. The filter settings open.
  2. Define the filter settings.
  3. Click Save.

Editing a filter

To edit a filter:

  1. Click Edit for the filter. The filter settings open.

    Editing a filter

  2. Edit the filter settings.
  3. Click Save.

Removing a filter

To remove a filter, click X for the filter.

Removing a filter

Optional

Defining the recommendation strategy settings

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

AlgorithmDescriptionPage typeRegeneration
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.

Example

The visitor recently bought the following items:

  • Item A from category X one day ago
  • Item B from category Y five days ago
  • Item C from category Z nine days ago

The algorithm returns items from categories X and Y that visitors have commonly bought together with items A and B.

All1 day
Bought together with current categoryReturns items bought together (by default, in the past 60 days) with items from the category the visitor is currently viewing.Category1 day
Bought together with current itemReturns items bought together (by default, in the past 60 days) with the item the visitor is currently viewing.Product1 day
Bought together with item added to cartReturns items bought together (by default, in the past 60 days) with the item the visitor added to their shopping cart.Cart1 day
Bought together with items recently viewed by the visitorReturns 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).All1 day
Most bought on the site in the past 24 hoursReturns the most bought items on the site in the past 24 hours.All1 hour
Most bought on the site in recent daysReturns the most bought items on the site in, by default, the past 7 days.All1 day
Most bought on the site in recent monthsReturns the most bought items on the site in, by default, the past 60 days.All1 day
Most viewed by the visitorReturns items the visitor has viewed the most in, by default, the past 7 days.All1 day
Most viewed on the site in the past 24 hoursReturns the most viewed items on the site in the past 24 hours.All1 hour
Most viewed on the site in recent weeksReturns the most viewed items on the site in, by default, the past 30 days.All1 day
Recently viewed by the visitorReturns items the visitor has viewed in, by default, the past 7 days.All1 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.

Example

The visitor recently viewed the following items:

  • Item A from category X one day ago
  • Item B from category Y five days ago
  • Item C from category Z nine days ago

The algorithm returns items from categories X and Y that visitors have commonly viewed together with items A and B.

All1 day
Viewed together with current categoryReturns items viewed together (by default, in the past 30 days) with items from the category the visitor is currently viewing.Category1 day
Viewed together with current itemReturns items viewed together (by default, in the past 30 days) with the item the visitor is currently viewing.Product1 day
Viewed together with items recently viewed by the visitorReturns 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).All1 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.

Example

The visitors current search returns 20 items:

  • 2 items from category A
  • 5 items from category B
  • 8 items from category C
  • 2 items from category D
  • 3 items from category E

The algorithm returns items that visitors have commonly viewed together with items from categories C, B, and E.

Search1 day
Viewed together with recently searched itemsReturns items viewed together (by default, in the past 30 days) with the top three items in the visitor's current search results.Search1 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

SettingDescriptionRole
NameEnter 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.

Example

If 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 rule

To add a rule:

  1. Click Add rule. The Control Panel adds an undefined rule.
  2. Select the item attribute you want to use for filtering items. The field automatically lists the item attributes tracked for the site that support filtering.

    Entering the name of the item attribute

  3. Select the relational operator for comparing the item attribute value to the target value. The drop-down menu only displays operators that are valid for the data type of the selected item attribute.

    Selecting the relational operator for the comparison

  4. Enter or select the target value for the comparison. The field automatically lists the different values tracked for the specified item attribute.

    Entering the target value for the comparison

    The target value can be either a regular string or, for one of and any one of operators, a JSON-stringified array. For regular expressions, use the RE2 syntax.

Editing a rule

You can change the attribute, operator, and value of a rule.

Removing a rule

To remove a rule, click X for the rule.

Removing a 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'

Filter evaluation examples
type: Books -> TRUE
type: BOOKS -> TRUE
type: books -> TRUE
type: Book -> FALSE
type: Magazines -> FALSE

Return all items from the category "Books", except ones from a specific company

Return all items from the category 'Books', except ones from a specific company

Filter evaluation examples
type: Books, company: Random House -> TRUE
type: Books, company: Vanity Press -> FALSE
type: Magazines, company: Random House -> FALSE

Return books that cost less than 30 currency

Return books that cost less than 30 currency

Filter evaluation examples
type: Books, price: 29.99 -> TRUE
type: Books, price: 39.99 -> FALSE
type: Magazines, price: 19.99 -> FALSE

Filter examples: contains, begins with, ends with

Return items whose name contains "cheetah"

Return items whose name contains 'cheetah'

Filter evaluation examples
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

Return items whose name does not contain "cheetah"

Return items whose name does not contain 'cheetah'

Filter evaluation examples
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

Return movies whose name starts with "A"

Return movies whose name starts with 'A'

Filter evaluation examples
type: Movies, name: Aliens -> TRUE
type: Movies, name: aliens -> TRUE
type: Movies, name: Tenet -> FALSE
type: Movie, name: Argo -> FALSE

Return movies whose name starts with "A", "B", or "C"

Return movies whose name starts with 'A', 'B', or 'C'

Filter evaluation examples
type: Movies, name: Aliens -> TRUE
type: Movies, name: aliens -> TRUE
type: Movies, name: Tenet -> FALSE
type: Movies, name: Babe -> TRUE
type: Movies, name: A Clockwork Orange -> FALSE

Return books whose title ends with "for dummies" and that cost less than 30 currency

Return books whose title ends with 'for dummies' and that cost less than 30 currency

Filter evaluation examples
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

Filter examples: is one of, begins with any one of

Return hotels located in Cairo, Kochi, or La Paz

Return hotels located in Cairo, Kochi, or La Paz

Filter evaluation examples
type: Hotel, city: Cairo -> TRUE
type: Hotels, city: Kochi -> TRUE
type: Hotels, city: LaPaz -> FALSE

Return beach volleyball events in Finland, except those in Tampere and Turku

Return beach volleyball events in Finland, except those in Tampere and Turku

Filter evaluation examples
mainCategory: Beach Volleyball, country: Finland, city: Helsinki -> TRUE
mainCategory: Beach Volleyball, country: Finland, city: Tampere -> FALSE
mainCategory: BVB, country: Finland, city: Turuku -> TRUE

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 is 'slots'

Filter evaluation examples
categories: ["jackpot","slots"] -> TRUE
categories: ["jackpot","slot"] -> FALSE
categories: ["poker","stud"] -> FALSE

Return any item one whose categories contains "jack"

Return any item one whose categories contains 'jack'

Filter evaluation examples
categories: ["jackpot","slots"] -> TRUE
categories: ["JACKPOT","slot"] -> TRUE
categories: ["blackjack","cards"] -> TRUE

Return any item one whose categories starts with "slot"

Return any item one whose categories starts with 'slot'

Filter evaluation examples
categories: ["jackpot","slots"] -> TRUE
categories: ["jackpot","slot"] -> TRUE
categories: ["poker","stud"] -> FALSE

Filter examples: regular expressions

The platform supports the RE2 syntax for regular expressions.

Return movies whose name starts with "A" or "a" and ends in "s"

Return movies whose name starts with 'A' or 'a' and ends in 's'

Filter evaluation examples
type: Movies, name: Aliens -> TRUE
type: Movies, name: aliens -> TRUE
type: Movies, name: ALIENS -> FALSE
type: Movies, name: Alien -> FALSE