Our current email recommendation offering is being replaced with our new Experience Email capability.
- As of November 7th, 2021 it will no longer be possible to create new email recommendation campaigns. Old campaign data will still be accessible.
- As of February 21st, 2022, the email recommendation screens will no longer be available.
Learn how to recreate existing widgets in our new Experience Email.
You can add product recommendation widgets to your email campaigns using Dynamic Yield. You can choose from a variety of recommendation algorithms - personalized (for example, User Affinity or Deep Learning), or global (by popularity, similarity). Recommendations are served at the moment the user opens the email. This ensures the relevancy of the recommendations and that the product properties are up to date (e.g. price). Implementing a campaign is done by taking an embed code and pasting it in the ESP editor, wherever the recommendations should be displayed.
Note: Personalized algorithms require adding the user identifier in the email (see more below, under Embedding Recommendations). It means you need to implement an identifier event on your site (Signup, Newsletter Subscription, Login, and the Identify API).
Creating Email Recommendation Widgets
Email campaigns have 2 types of settings: The design (template, number of items) and the recommendation logic (algorithm, filters).
- Go to Email › Recommendations and click Add New.
- Click Select a Template and select an email recommendation template. You can use the out-of-the-box template, or create your own.
- Enter values for the template variables (e.g. title, color, etc.), including the number of items.
- Choose the algorithm you want to use. It can be “Popularity”, “User Affinity” and more. To learn more about the algorithms read here.
- You can choose to exclude products that the user has purchased to avoid recommending these products.
- If you are using the Popularity algorithm, you can choose to “Shuffle” results (recommended). This adds a bit of randomness to the recommendation widget. Without it, if the user opens 2 emails with the same algorithm, they will see exactly the same results.
- You can add a custom filter rule to pin specific products to slots, or include or exclude products by product properties (e.g. not show products that cost less than $5, or show only products from the shirts category). For more details, see Recommendation Rules.
- Use the URL parameters to track clicks within your analytics software (optional)
- Click Save. You can copy one of the embed codes that is displayed now, or get the embed code at any point in the future by clicking the embed code icon next to any email recommendation campaign.
Embedding Recommendations Into Your ESP
Embedding recommendations is done by pasting a code snippet into any ESP. The code snippet includes variables that you will need to replace with your ESP variables (see details below). Dynamic Yield supports a native integration for Cheetah Digital, Emarsys, Klaviyo, MailChimp, Salesforce Marketing Cloud, and Oracle Bronto. With the native integration, the embed code automatically includes the ESP variables.
- Go to Email › Recommendations.
- Click the embed code button next to the email recommendation campaign you want to embed.
If integration is not turned on, replace any of the following texts that exist in the code:
-
REPLACE_WITH_EMAIL – The ESP merge tag that represents the email address or external identifier, depending on how you identified your users.
If you use external identifiers, add the code dy_cuidtype=external immediately after this value. For example: dy_cuid=user234xy&dy_cuidtype=external -
REPLACE_WITH_CAMPAIGN_VERSION – The ESP merge tag that represents the unique Id of the email campaign. By default, recommendations are cached for each user for a period of 4 days, so if they reopen an email - they will see the same content. However, you can use the same widget on multiple email campaigns (e.g. using a "most popular" widget on every newsletter). Caching is managed per campaign version, so the user will see updated results if they open a different email with the same widget.
-
REPLACE_WITH_LOCALE – The localization string for users supporting multiple languages. The language code should match what you specified in your product feed. For details, see Multi-Language Support.
-
Advanced Embedding Options
(e.g. Bought Together in Transactional Emails)
When using Similarity and Purchased Together algorithms, you require to set a context. The context will allow the algorithm to recommends products that were purchased together with a specific item or that are similar to a specific item.
When creating a widget, you can determine a specific SKU. However, if you want to set a dynamic SKU, you can do that as well. This is done by adding a parameter to each <img> tag of the recommendation items with the SKU(s) that should serve as the context:
&cartCtx=sku1,sku2,sku3
For example:
<a style="text-decoration: none;" href="https://em.dynamicyield.com/emclk/8765432/4074/75741/15126/3/0?dy_ts=1544426026941&dy_cuid=REPLACE_WITH_EMAIL&dy_version=REPLACE_WITH_CAMPAIGN_VERSION&utm_source=Dynamic%20Yield%20recommendations&utm_medium=email"
target="_blank"><img src="https://em.dynamicyield.com/emop/8765432/4074/75741/15126/3/0?dy_ts=1544426026941&dy_cuid=REPLACE_WITH_EMAIL&dy_version=REPLACE_WITH_CAMPAIGN_VERSION&cartCtx=[REPLACE_WITH_PRODUCTS]&utm_source=Dynamic%20Yield%20recommendations&utm_medium=email" alt="" />
</a>
You can add up to 20 SKUs in this parameter.
In some cases, you may want to dynamically exclude specific products from being recommended in the email based on what you are currently presenting in the email. In that case, you can add the following URL parameter to all links and images in each slot of the recommendation:
&exclude_list=sku1,sku2
You can either enter the SKUs for that specific email manually or use a merge tag from your ESP to which will dynamically insert the SKUs you would like to exclude.
You can exclude up to 50 products from each widget.
Recommendation items are served as images in optimized quality (i.e. minimized for fast loading). However, if you'd like to improve image quality for better visibility of small details - you can do that by adding a dy_zf=2 parameter to your <img> tags:
<a style="text-decoration: none;" href="https://em.dynamicyield.com/emclk/8765432/4074/75741/15126/3/0?dy_ts=1544426026941&dy_cuid=REPLACE_WITH_EMAIL&dy_version=REPLACE_WITH_CAMPAIGN_VERSION&utm_source=Dynamic%20Yield%20recommendations&utm_medium=email"
target="_blank"><img src="https://em.dynamicyield.com/emop/8765432/4074/75741/15126/3/0?dy_ts=1544426026941&dy_cuid=REPLACE_WITH_EMAIL&dy_version=REPLACE_WITH_CAMPAIGN_VERSION&dy_zf=2&utm_source=Dynamic%20Yield%20recommendations&utm_medium=email" alt="" width="195"/>
</a>
If you use the dy_Zf=2, images are rendered twice as large as the item template size.
If you wish to include the "dy_zf=2" parameter in the embed code by default - contact Support.
Preview Email Recommendations
The preview tool allows you to see how different users from different locales will see these campaigns. To use the preview tool, visit the following page: http://lp.dyo.io/aipa/email-campaign-preview.
Preview Options
Creating An Email Recommendation Template
You can create a custom email recommendation template by creating a template for the items and a template of the widget that wraps the items.
- Go to Assets › Templates and click Add New.
- Name the item template, and select Email Recommendation Item as the template type. This template will define the look and feel of each individual item in the recommendation widget.
- Use HTML, CSS, or JavaScript to define the recommendation items. Use variables to define what will be pulled into the items from your product feed such as product URL, product image, product name, etc. Note that the supported formats for product images in email are JPG, PNG, or GIF.
- Save the template.
- Select Add New again and create a template of type Email Recommendation Widget. This template will define the look and feel of the overall recommendation widget and should include email recommendation items.
- Specify the email recommendation item template you just created.
- Define the widget using HTML and in-line CSS.
Use the variable ${item} to indicate the location of the recommendation items in the widget. Click the variable to set the type as Email Recommendation Item. - Set the minimum and the maximum number of items. This will be and to specify the minimum and maximum number of items as well as a tooltip (optional). The actual number of items that will be included in the widget is determined later for each implementation of the template.
- You can add additional variables to your widget depending on your use case.
- You can use any of the supported fonts. See the list below.
- Save the Template. You can now use this template when creating Email Recommendation Widgets.
Email Recommendation Algorithms
You can select the algorithm that will be served in all items of the recommendation widget:
Algorithm | Description |
---|---|
Popularity |
Scores items based on the weighted sum of all product interactions – such as purchase, add to cart and product view – favoring recent interactions over historical ones. You can expose the user to more products by intelligently reordering the algorithm's top results by checking Shuffle Results. This works by requesting more products from the main algorithms than is required. For example, if a widget has 4 slots, this will request the 16 most popular products. All of the results get a weight based on their popularity, and then the a lottery system that takes the weights into account randomly selects 4 items. The results should reflect that items that are almost as popular as the top 4 from the 16 returned results now have an almost equal chance of being displayed, but items that are nowhere near as popular now have a low chance. Without this option, the top four results would always be displayed. |
Purchased Together |
Recommends products that have been purchased together with the products you enter here. You can specify up to 10 items from your feed. It scores items based on the number of occurrences they have been purchased together in the same transaction but demotes products that are typically purchased with many other items. Consequently, products that are strongly linked to one another rather than having an arbitrary connection to a very popular product. |
Similar Products To |
Recommends items that are similar to the products you enter here, factoring in item popularity. You can specify up to 10 items from your feed. The algorithm uses categories and keywords provided from the product feed to score similarities between items, assigning higher scores to rare keywords shared between a pair of products and lower scores to more common terms. |
Viewed Together |
Recommends items that have been viewed in the same session as the items you specify here. You can specify up to 10 items from your feed. It scores items based on the number of occurrences they have been viewed together in the same session but demotes products that are typically viewed with many other items, implying a weaker connection. |
User Affinity |
Personalized for each individual user and scores items based on derived user preference and product popularity. The algorithm bases its recommendation on the visitor’s interactions with the products (views, add to carts and purchases) and their weighted scores. Then it analyzes the attributes of the products (brand, color, style, category, etc.) and calculates the user’s affinity profile. The strategy works in real-time and can detect preference changes over time. When there is not enough data to produce a personalized recommendation, the algorithm will offer a set of fallbacks strategies scaling from the most personalized to the most popular. |
Collaborative Filtering |
Items viewed, purchased, or added to the cart by users who are similar to the current user. This algorithm is only supported for small feeds (less than 50,000 products). This feature is available to select customers upon request to your Customer Success Manager. It is also not available for EU sections. |
Deep Learning |
Predicts the next item that a user is most likely to interact with, based on similar engagement patterns of your users. This algorithm is supported by any feed type. This algorithm is not available for media sites. It is available to select customers using ecommerce sites upon request to your Customer Success Manager to be part of our gradual rollout. |
Viewed with Recently Viewed |
Items that are usually viewed in the same session with the last items viewed by the current user. |
Purchased with Recent Purchases |
Items that are usually purchased together with items the current user recently purchased. |
Purchased with Last Purchase |
Items that are usually purchased together with items in the last purchase by the current user. |
Note: For algorithms ‘Purchased Together’, ‘Similar Products To’ and ‘Viewed Together’ – Some ESPs support setting the reference items dynamically instead of specifying them individually. To see if this applies to your ESP, contact your Customer Success Manager.
Fallbacks
In case the strategy returns fewer items than the number of slots, the system will first ‘loosen’ any constraints imposed by the basic filters. If there are still fewer results than the required items, the recommendation engine will run a respective fallback algorithm:
- User Affinity → Popularity
- Collaborative Filtering → User Affinity → Popularity
- Similarity → Popularity
- Purchased Together → Similarity → Popularity (except in cart pages, where similarity is skipped)
- Viewed Together → Similarity → Popularity
- Viewed with Recently Viewed → Viewed Together → Similarity → Popularity
- Purchased with Last Purchase → Purchased Together → Similarity → Popularity
- Purchased with Recently Purchased → Purchased Together → Similarity → Popularity
- Deep Learning → User Affinity → Popularity
Notes:
- The following strategies have no fallback: Recently Viewed, Last Purchase, and Recently Purchased.
- Fallbacks do not override a product properties filter. For example, if you excluded products ‘of a different gender’ property than the currently viewed product – we will respect the constraint even when there are not enough products to display in all available slots. However, if there are no items based on the filter, we will remove the last filter and ignore it to prevent the widget from returning empty.
Custom Filter Rules
You can add custom filter rules that affect what recommendation is served. For example, showing only items from a specific category, or pinning an item to a specific slot. Learn more about Recommendation Filter Rules here.
Customers using "lng" parameters can create localized filters. See Multilingual Support for more information.
Note that if you used filters that results in smaller eligible products than the number of slots, white images are displayed, with a target URL of ‘yoursite.com/404’ (the domain is taken from the General Settings screen, so make sure that your site’s main domain is updated).
Supported Fonts
Font | Font-Family | Font Weights |
---|---|---|
![]() |
'Abril Fatface', cursive | 400 |
![]() |
'Anton', sans-serif | 400 |
![]() |
'Arvo', serif | 400, 700 |
![]() |
'Balsamiq Sans', cursive | 400, 700 |
![]() |
'Bangers', cursive | 400 |
![]() |
'Bebas Neue', cursive | 400 |
![]() |
'Bungee', cursive | 400 |
![]() |
'Cinzel', serif | 400, 500, 600, 700, 800 |
![]() |
'DM Serif Display', serif | 400 |
![]() |
'EB Garamond', serif; | 400, 500, 600, 700, 800 |
![]() |
'Josefin Sans', sans-serif; | 100, 300, 400, 500, 600, 700 |
![]() |
'Lato', sans-serif | 300, 400, 700, 900 |
![]() |
'Merriweather', serif; | 300, 400, 700, 900 |
![]() |
'Montserrat', sans-serif | 300, 400, 500, 700, 900 |
![]() |
'Oswald', sans-serif | 300, 400, 500, 700 |
![]() |
'Playfair Display', serif | 400, 500, 700, 800 |
![]() |
'Raleway', sans-serif | 300, 400, 500, 700, 800 |
![]() |
'Roboto', sans-serif | 300, 400, 500, 700, 800 |
![]() |
'Roboto Mono', monospace | 300, 400, 500, 700 |
![]() |
'Rubik', sans-serif | 300, 400, 500, 700, 800 |
![]() |
'Source Code Pro', monospace | 300, 400, 500, 700, 900 |
![]() |
'Special Elite', cursive | 400 |
![]() |
'VT323', monospace | 400 |
All supported fonts are distributed by Google Fonts under SIL Open Font License, 1.1.
Frequently Asked Questions
What happens when a recipient returns to an email in which one or more of the items are no longer available?
Since we cache the images of recommendations, when a recipient returns to an email they will still see the image. However, when they click on the item, it will redirect them to the ‘yoursite.com/404’ page. We grab your main domain from the site settings.
What happens if the recipient or email client blocks external images?
For security reasons, some email clients do in fact block external images until the recipient opts to display external images; this will prevent the recommendations from displaying until the recipient either changes the settings or clicks on “display external images”.
Why am I not seeing any images in some or all of my email recommendations?
Make sure that your SKU's do not contain the string "//", this is not supported and will cause an error when trying to render the email recommendation.
Are there any out of the box templates for email recommendation campaigns?
There's only one template that is created out of the box in your site's template - it is called Row.