Create an Optimizely Email Product Recommendations campaign

  • Updated
Optimizely Email Product Recommendations is part of the Optimizely Digital Experience Platform (DXP). It requires a specific installation and license. The Optimizely Digital Experience Platform contains many features to support you in your daily work. Depending on how your solution is set up, some features described in this documentation may not be available.

Optimizely Email Product Recommendations lets you deliver product recommendations to customers by email.

To create an Email Product Recommendations campaign:

  1. Go to Configuration > Email Product Recommendations.
  2. Click Create campaign.

There are three main steps in the set up process:

  1. Style the product information image
  2. Configure recommendation strategies
  3. Preview and generate the recommendation code

Style the product information image

The Style editor step lets you configure how the product information image displays for email recommendations. Your modifications are displayed in the Preview section.

  • Campaign – Enter the name of your Email Product Recommendations campaign.
  • Style template – You can select a previously saved style template, adjust the style settings as desired, and then save it as a new template.
  • Image configuration – Set your desired width, height, color, and opacity (modify the background color so that you can have a transparent background) for the product information image.
    The size of the actual product image will not change because that image is delivered with the same size as your system provides it to Optimizely in the product catalog feed.
  • Text styles – Set your desired color, font, style, size, and alignment for the product information image title, product or sale price, and unit price
  • Show advanced settings – Click to edit HTML and CSS for the image. You can edit other elements, such as displaying Was prices or product ratings. The product information image is rendered similarly to a browser so that you can use standard HTML and CSS.
    Click Need help for information about the syntax of variables and logical operations.
  • Embed image – Toggle On to adjust the order and style of the image in the product recommendation. With this toggled On, go to the Advanced settings; a line for the image is added to the HTML or CSS, letting you move the image to a different position or add special styling. For example, move the line for the title above the line for the image so that the title displays above the image in the final recommendation.
    If you have Embed image toggled On, you must add the following rule in your CDN with a higher priority than other existing deny rules:
    • Allow requests where User-Agent header is ProductRecs/tracker.

    If you leave this toggled Off, the product image and text image of each product recommendation remain separate, meaning you cannot adjust the order of the image and text within Advanced settings, and the final recommendation will display the product image above the text.

Select the Configuration step next.

Configure email recommendation strategies

In the Configuration step, specify how many products you want to display in the Email Product Recommendations campaign, specify localization settings, add third-party tracking code, and configure the recommendation strategies.

  • Number of products – Set the number of products you want to display in the campaign.
  • Locale – If your site is multi-lingual and is tracked under a single account in the Optimizely Recommendations portal, select the appropriate locale for the email campaign. This determines the language that your product recommendation campaign uses.

    Each campaign should be specific per locale (such as dk, en, se, and so on), and only products with the locale should be recommended. This is so email recipients get only products that the customer can buy and not products that might be sold in only some countries or locales where the customer cannot make a purchase. You also can use other filter attributes (such as allowedcountry or exceptioncountry) to ensure recipients get the best recommendation.

  • No repeat (in days) – Set the number of consecutive days that recommendations are not repeated in multiple emails for the same campaign. For example, if you sent a Daily Deals type of email and you want to ensure that the recommendations are different, you can select No repeat in 3 days. This ensures that if the same user sees the same campaign multiple times in 3 days, the user will see different recommendations.
    • Purchases – look back is one year.
    • Abandoned baskets – look back is three months.

    No repeat (in days) resets after the specified time and starts counting afresh for a product when it gets recommended.

  • Tracking code – If you want to add third-party analytics code to the product recommendations to track their performance in tools such as Google Analytics, Coremetrics, Omniture, and so on, add the tracking parameter generated by your preferred analytics tool.
  • Use top-ups – Displays a best seller from the last seven days, if none of the strategies in the stack return a result.

Add products and configure strategy per product

The visual editor displays the number of products you choose to set up.

In each of the products, you can choose one or more different strategies available. Each product's strategies are independent so that you can apply a different strategy or combination of strategies to each product.

Click a strategy field and scroll through the drop-down list. You can start typing in the name of a strategy to filter the list. When you find your chosen strategy, click its name to add it to the product position.

You can stack strategies for each product position, one after the other, so that the system finds products that match the first strategy in the top line first. If that strategy returns no products, the next strategy in the stack is tried, and so on, until the product position is filled. For example, a strategy stack might look like this:

In this example, Optimizely searches for products the user abandoned based on the recipient's email address, having browsed or purchased on the site using the same email address. If no product was found, Optimizely uses the second strategy line to find recently viewed products. If it does not find any recently viewed products, it finds products that were recently added to the site from the past 14 days, and so on, until a matching product is found. See Create a product set for information about product sets.

The example strategy also has a Fallback product set specified if none of the above strategies returns a product.

  • Reorder product positions – Drag and drop a product position to the desired order.
  • Duplicate – Click to copy the same product position to another product position.
  • Delete – Click X in the top right corner to delete a product position.

To ensure that there is never a blank product position in a campaign, you can do the following actions:

  • Fallback product set – Select a product set from a list of preselected products that can display in the recommendations if none of the strategies return a result.

    Fallback product sets do not follow hints or expressions applied to the product position.

  • Use top-ups  – Ensures that the system displays a best seller from the last seven days, if none of the strategies in the stack return a result.

    Top-ups try to find recommendations that match hints and expressions first; if that fails, hints and expressions are ignored. Each time, the following order is followed:

    1. best sellers with hints and expressions
    2. product catalog with hints and expressions
    3. best sellers without hints and expressions
    4. product catalog without hints and expressions

    Empty slots in the widget occur when the Strategy, Expression, and Hints are too restrictive and no results are returned.

You can check if a fallback or top-up was used for a recommendation by looking at the Detailed Information on the HTML and preview step.

Click Detailed information to see expanded data.

Image: Email details

Preview and generate the recommendation code

The HTML and preview step lets you generate the code added to your email template and preview the Email Product Recommendations widget output.

Generate the HTML code to add to your template

  1. Select your Email service provider (ESP) from the drop-down list to populate the fields for the Variables.

    If you do not see your ESP, you can manually insert your ESP email variable in the Email address variable field. This information is available from your ESP, so if you are unsure what the correct variable is, contact your ESP account manager or Support team. Depending on your client set up, you may see additional fields for other variables; for example, if you have Triggered Messages and used a trigger strategy in your campaign, a Trigger fire ID variable field will display.

    The Email address variable is required to let Optimizely identify the user by their email to serve personalized recommendations specific to the user. Upon sending an email, your ESP populates the variable in the link with the recipient's email address. If the variable is not present or is incorrect, Optimizely is not informed of the user's email address and therefore cannot personalize the recommendations.
  2. After the variable is populated, click Generate code. The generated HTML code displays.


  3. Copy and paste the HTML code into your email template to retrieve recommendations.

    The generated HTML code is annotated to show the links for each product recommendation clearly. Each recommendation consists of two images (the product image and the product information image), each of which is commented so you can use the images how you want to fit your template design best.

    The generated code does not include any other formatting. You can add HTML and CSS to your template to style the recommendations, such as adding them to a table or resizing the product images.

Preview your campaign

To preview the output of the campaign configuration, you can choose one of the following options:


  • Preview the email recommendations within the Recommendations portal, which displays on the HTML and preview page.

    Image: Preview of email

  • Send a test email to your email address to view the recommendations within a basic email template. You must enter your email address in the field in the Preview or send a test email field beforehand.

When you preview the recommendations in the Recommendations portal, a sample output displays for the email address you entered. You can try different email addresses to see how the recommendations may look for different users.

You can view information about the recommended products in the preview. Click Detailed information below the recommendations to open a browser tab or window; detailed information displays for each recommended product, and the strategy that generated the recommendation.

Image: Detailed information screen

When you have confirmed the campaign is configured as desired, click Save campaign.