Set up an Optimizely Product Recommendations campaign

  • Updated

To create an Optimizely Product Recommendations campaign, click Create a new campaign from the Recommendations overview screen, or select the Recommendations > New campaign tab. The campaign editing screen appears. The set-up process involves the following steps:

  1. Configure campaign details
  2. Define master rules
  3. Define rules
  4. Apply exclusions
  5. Set up activation and preview
  6. Approve campaign changes

Configure campaign details

In the Details tab, configure the main details of the Product Recommendations campaign: name, location and position of the widget to which the Product Recommendations campaign is applied.


  • Name – Enter a name for the campaign you are creating, such as Product  Page Strategy or Brand Rule.
  • Widget location – Select the widget location; this is the page type where the target widget of the Product Recommendations campaign is located.
  • Widget position – Select the widget you want this campaign to be applied to. The widget position drop-down lists available widgets on the selected destination page.

Define master rules

Setting up Master rules is optional.

Master rules let you refine the Product Recommendations campaign effects to pages, products, or visitors. If you do not specify any master rules, the merchandising rules are applied globally across the selected widget for a campaign. If you apply a Master rule, it must be satisfied to apply product recommendation rules.

A master rule lets you define where the rule will work. For example:

  • If you setup a master rule that states r.category="category A", the campaign operates only on category A; other categories will not apply the campaign.
  • If you do not define a master rule (a master rule is not required) then the campaign applies to every instance of that widget. For example, if you setup a campaign on the category widget, the campaign applies to every category page, such as category A, B, C, ... Z.

For example, you may have one product recommendation rule that recommends products that are over $50, and another rule that recommends products only from Brand X. You can set a Master rule that lets only products that have at least 10 items in stock be displayed (for either the over $50 rule, or the Brand X rule).

Examples of Master rules frequently used:

Use case Master rule
Recommend only products from the same brand as the current product being viewed. Brand equals to and type the brand name in the Search field.
Recommend a specific product SKU when a specific product is viewed (that is override with a hand-picked product). Ref Codes equals to and type the product SKU.
Only recommend products above a specific price when a user is viewing a product above a certain price. Sale Price greater than or equals and type in the price (such as 25).
Do not recommend discounted products when a user is viewing a full priced product. Discount equals to False.
  1. To add a Master rule, select the product attribute for your products from the drop-down list. The attributes are based on the product feed, plus a few attributes that Optimizely creates by default. If you do not see the attribute that you want, add it to your product feed.
  2. Select the condition you want in your rule. For attributes that have a text value, such as Color or Brand, choose between equals to or NOT equals to. For attributes with a numeric value, such as Sale price or Unit price, you also can use comparison operators like greater than or less than.
  3. In the text field, enter the value of the attribute to be evaluated. For most attributes, a drop-down list shows values when you click in the text field. You also can start typing in the box to filter the results. Click a value to select it. Numeric values (such as prices) do not have a pre-populated list; enter the value manually.


    You can add multiple rules by clicking the Add group or +. When using multiple rules you can choose how you want them to interact by setting the AND or OR operator.

    To remove a rule, click X.

    Click Toggle advanced to view and edit the code directly.

Define rules

Create and configure the rules to be applied to the product recommendations shown in your widget. You can apply a rule to positions in the widget. You also can create different rules for each position, or leave a position blank to show the default output of the Optimizely algorithms.


  • Click Merchandising rule to add another recommendation rule for a broader range of products, such as any product with more than 10 units available. Only products that match the recommendation rule and the Optimizely algorithms are displayed.
  • Click Hand-pick rule to create a rule that overrides the recommendation rule when a specific product is viewed. The product recommendations are displayed regardless of the recommendation rule and the Optimizely algorithms.
  • Use the drop-down fields to add the required criteria for the product recommendations in the same way as you would for a Master rule.
  • You can add more than one criterion in the same rule by using +, and the AND and OR operators.
  • After you finish setting up your rule, drag and drop the rule number to the required position in the widget, where you want it applied. The following image shows rule 1 applied to product position 1, and rule 2 applied to product position 2 and 3 and rule 3 applied to position 4. You can apply the same rule to more than one product position. If you want the same rule to apply to all products in a widget, click Apply to all.
  • You can add more than one rule to the same Product Recommendations campaign, if want to apply different rules to different positions in the same widget. For example, you can apply rules for the first product to have a sale price of 25.00 or more, the second product between 15.00 and 24.99, and the third product under 15.00. To add another rule, click +.
  • Click the currency code to select another currency code from the resulting menu.


  • Click Toggle Advanced (down arrow/up arrow) if you want to manually enter the coding.


Apply exclusions

Exclusions are optional.

Exclusions let you specify products that you do not want to show in the widget (specified in the Product Recommendations campaign in the Details tab). For example, you set up a product recommendation rule to show products from a specific brand – BRAND1 – but there are some products from BRAND1 that you actually do not want to show.

In the search field you can type a product SKU/refCode or title to find the product you want to exclude from recommendations. Click the products in the results to add them to the exclusions list, and click Finished after you have added your exclusions.


See Activate and preview and Approve campaign changes to complete the campaign.