Recommendations allow you automatically display the most relevant items to each user. Our machine learning strategies are based on your data feed, user behavior, and general user trends calculate decisions based on the strategies you select. The recommendation engine scores each item in your data feed according to your strategy. Depending on your settings, additional filters may be applied to limit the results. Once the list is complete, the items are sorted by score and relevance to the user and context, and the top results are displayed.
Creating a Recommendation Widget
- Go to Site Personalization › New Campaign › Recommendations
- Enter a name, and add notes and labels (optional).
- Specify the campaign settings such as page type, insertion method and advanced settings. See recommendation campaign settings below.
- Configure the targeting settings of the experience to determine when, where, and for whom the experience is displayed.
- Create variations using templates, based on other experiences, or by using a data feed.
- Template. When creating a new recommendation widget variation, you can create a custom HTML template or select one of Dynamic Yield’s out-of-the box templates.
- Design. The variable tab provides you with your customization possibilities such as the widget’s number of items and their attributes (title, length, price). It also includes the widget’s recommendation strategy.
The strategy drop down will populate with relevant strategies based on the previously defined Page Type. The menu icon provides additional options to include: creating a new strategy; editing an existing one ; or duplicating a strategy for tweaking and saving as new. Learn more about Recommendation Strategies
Note: The preview pane does not reflect the chosen strategy.
- When you are done with each variation, click Save Variation.
- Set the allocation, primary metric, and advanced experience settings.
- Configure how much of your traffic to allocate to each variation to the control group.
- Click Save Experience.
- Click the plus icon
to create an additional targeted experience.
- Click Preview to see how your campaign will appear, and click Save and Publish when you are ready to go.
- To track the performance of your recommendations, click the report icon
next to the campaign name.
Adding Recommendations to Landing Pages, Display Ads, Overlays, and Notifications
You can add recommendations into a different Dynamic Yield campaign such as an overlay or display add. This is done by creating a specialized template, and using that template when creating the campaign. To add recommendations to an email campaign, see Email Recommendations.
- Go to Assets › Templates and click on Add New.
- Select the type of template and click the Enable product recommendations checkbox.
- Create the template using HTML, CSS and JS.
- To display a recommendation, insert the following code into the html tab:
${#Recommendation} <a class="rec_item" href="${url}"> <img src="${Image}" /></a> <div class="rec_name">${Name}</div> ${/Recommendation}
This ‘Recommendation tag’, wraps the html of the single item design. To display the relevant image, product/post name or any other property, set the variable type to “Feed Property” and then select the corresponding property (see image).
When you add this tag to your html, a new variable – Recommendation Strategy – will appear in the Variables tab. This variable will allow you to select the recommendation algorithm and the number of items to present in the recommendation.
- Save the template
- To use the template, select it from the My Templates tab when creating a variation.
Recommendation Campaign Settings
When creating a Recommendation campaign, you specify the settings such as page type, insertion method and advanced setting. This section contains details about these settings.
Page Type
The page type the recommendation will be placed on. You can choose ‘other’ if none of the options fit to your use case.
Location
Recommendations can be inserted and placed onto any page of your website using the following methods:
- Replace Element: Dynamic Yield will render the Recommendation, replacing an existing element on your site with no technical or IT resources. You specify the element to replace as a CSS Selector.
- Add After Element: The same as replace element, but the element is places just after a specific CSS selector.
- Add Before Element: The same as replace element, but the element is places just before a specific CSS selector.
- Embed with Code– Implement a Recommendation directly into your website’s source code (Dynamic Yield will not render it). After publishing the campaign, hover over the campaign name and click on the code icon to locate the code.
For the first three options, you also specify which pages Dynamic Yield should render the campaign on.
Advanced Settings
- Fire Google Analytics Event: Only visible if the Google Analytics integration is enabled. This option is enabled by default, but you can disable it to prevent reporting data to Google Analytics about a specific Recommendation.
- Execute custom integrations – Fire a custom JavaScript code when a variation is served. Custom integrations are managed in the Integration screen under Settings. This option is only visible if a custom integration is enabled.
- Serve on Every SPA Event: Relevant for single page applications that don’t generate a browser refresh with every change of screen. If you need the Recommendation to relaunch or reevaluate its targeting conditions upon each screen change in your single-page application, fire a track_pageview event and enable this option. For more information on working with single page applications, please refer to this article.
- Optimize Site Loading Time: Stores the experience offsite to maximize overall site loading speed. Recommended primarily for experiences below the fold to reduce the risk of a flicker.
Wait for Element: Prevent rendering the recommendation until an element has loaded or a condition has been met. Used primarily for troubleshooting purposes or to ensure that google analytics is tracking the recommendation properly. Select one of the following options, or use the + and option to specify more than one element to wait for:
- None (default). Do not wait for anything before rendering the recommendation.
- CSS Selector. Wait for an element to load on the page defined as a CSS Selector.
- JQuery Library. Wait for the JQuery library to load.
- Google Analytics (classic). Wait for Google Analytics (classic) to load.
- Google Analytics (universal). Wait for Google Analytics (classic) to load.
- Dynamic Yield Data. Wait for Dynamic Yield data (such as social proof metrics) to load.
- External Component. Wait for any custom-defined JavaScript function to load on the page.
Preventing Recommendation Duplication
If more than one recommendation widget exists on a single page, Dynamic Yield automatically prevents the same results from displaying in more than one widget via the following process:
- Dynamic Yield evaluates all recommendation strategies requested on the page.
- Recommendation strategy requests are batched to a single request and sent to the recommendations engine.
- Strategy requests are calculated one by one by the recommendations engine. As results are returned, they are automatically excluded from subsequent strategy results.
- Recommendations results are returned and rendered by Dynamic Yield.
In the following cases, recommendation results are not excluded even if they were returned in previous strategy results:
- Activity based recommendations, e.g. recently viewed products, recently purchased products
- Products pinned to specific slots using filtering rules
This process applies for recommendation that are rendered by Dynamic Yield. If you are manually rendering recommendations using the recommendationWidgetData API, you can use the exclude parameter to limit the results of each recommendation widget to prevent duplication.