First steps
User Data
- Responsive Email Editor Review
- Designing your email
- Creating Synchronized Modules
- Setting Up Responsive Email Design
- Setting Up Smart Containers
- Creating a Gmail Promotions Annotation
- Adding The Rollover Effect
- Adding Anchor Links
- Module Library
- Adding a Table to an Email
- Adding Custom Fonts
- Creating CTA Button
- Working with Images
- Creating Timer
- Using AI in the Email Editor
- Messenger Protocol Support in Email Clients and Platforms
Omnichannel
- Setting Up Widgets for Your Site
- Widgets Gamification
- Widget Calling
- Setting Up Locations for the Widget Calling Rules
- Storing data from widgets to contact fields
- Using Annoyance Safeguard
- Actions After Form Submission
- Replacing Double Opt-In System Workflow
- Creating Pop-ups via Google Tag Manager or WordPress
- Sending Yespo Widget Events to Google Analytics
- Using A/B Tests for Widgets
- Collecting Contact Information Using Request Forms
Automation
- Building and Editing Workflows
- Configuring Workflow Start/Stop Conditions
- Start Block
- Popular Blocks
- Message Blocks
- Using One from Many Message Block
- Contact Blocks
- Conditions Blocks
- Other Blocks
- Message to Segment Blocks
- Time Blocks
- Advanced Workflow Block Parameters
- Setting Up Allowed Send Time
- Using Workflow Launch History
- Webhook Workflows
- Workflow Troubleshooting
- Double Opt-In
- Welcome Сampaign
- Welcome Series Segmented by Category
- Launching a Workflow After a Contact Import
- Regular Workflow for a Segment
- Birthday Campaign
- Linking Workflow to the Button
- Using Variables from Order in Workflow
- Collecting Order Feedback
- Customer Reactivation
- Sending Extra Campaigns
- Sending Reminders at the Time Specified by the User
- Sending Campaign to Those Who Did Not Open the Previous One
- Using A/B Tests In Workflows
Personalization
Analytics
- Email Campaign Report
- Web Push Campaign Report
- Viber Campaign Report
- Mobile Push Campaign Report
- App Inbox Campaign Report
- Telegram Campaign Report
- In-App Report
- Widget Report
- Triggered Campaign Report
- AMP Campaign Report
- SMS Campaign Report
- Multilingual Campaign Report
- Setting up UTM Tags
- Revenue from Campaigns
- Tracking Campaign Performance in Google Analytics 4
- Message Analytics
Multilanguage Campaigns
Events and Behaviour Tracking
Recommendations
API
Security and Compliance
JS API Requests for Different Site Page Types
In order to use Yespo product recommendation algorithms and customize their display on your side (appearance of blocks, display pages, etc.), follow these steps:
- install the script on the site to track the behavior of site visitors;
- upload product data feed to your Yespo account;
- set up the recommendation algorithm in your Yespo account.
Examples of Requests
On the Home Page and 404 Page
eS('getRecommendations', {
'variantId': 'r554v778'
}, function(error, products) {
if (error) {
console.error(error);
return ;
}
});
On the Product Page
eS('getRecommendations', {
'variantId': 'r554v778',
'productId': 'MX-1512\42'
}, function(error, products) {
if (error) {
console.error(error);
return ;
}
});
On the Cart Page
eS('getRecommendations', {
'variantId': 'r554v778',
'productIds': ['123', '543534']
}, function(error, products) {
if (error) {
console.error(error);
return ;
}
});
On the Cart Pop-up
Use the StatusCartPage event to determine the page type and display recommendations on the cart pop-up. Example:
eS('sendEvent', 'StatusCartPage');
On the Categories Page
eS('getRecommendations', {
'variantId': 'r554v778',
'categoryKey': 'cK'
}, function(error, products) {
if (error) {
console.error(error);
return ;
}
});
The JS API method is asynchronous, which allows not to wait for the execution of other functions on the site.
Request Parameters
Name | Type | Example | Description |
variantId |
Required String |
r262v361 |
The unique ID of the recommendation variation in the Yespo account. |
productId |
Optional String |
MX-1512\42 |
To pass the product ID from the page the user is on. Required parameter for recommendations using the product algorithm (similar products, products that were bought together with some items); for other types of algorithms, it is not necessary to pass. |
productIds |
Optional List |
['123', '543534']
|
To pass a product ID or an array of cart product IDs. Required parameter for recommendations using the product algorithm (similar products, products that were bought together with some items); for other types of algorithms, it is not necessary to pass. |
categoryKey |
Optional String |
Jackets |
To pass the key of the category the user is in. Required parameter for recommendations using a categorical algorithm (personally for you in this category); for other types of algorithms, it is not necessary to pass. |
allFields | Optional Boolean | true\false |
Parameter for determining which product attributes will be in the recommendation request: All (which are available in the product data feed) or only Required: product_id Default parameter setting = false |
Response Example
Upon successful submission of the request, you will receive a response similar to the following:
Response body | Type | Description |
|
List<object> | ● product_id - recommended product ID ● container_type must be used when passing the event ProductImpression ● URL contains a link to the product, with an additional parameter for proper web tracking |
Important
Don’t edit the return value in the URL field for web tracking to work correctly.
Error Example
Example | Type | Description |
variantId r262v361 was not found in config |
String |
No such recommendation variant identifier was found. |
Important
Send the ProductImpressions event after calling and displaying the recommendations block for proper tracking.
Filtering Recommendations
Filtering recommendations through the JavaScript API allows you to show products on your site by filtering recommendations based on data from the feed or contact information stored on your side. For example, you can filter recommendations by the city of residence, clothing size, favorite brand, promotional offer, etc.
Filtering recommendations through JS API saves you from changing the filtering rules in the data source in Yespo account every time.
Request format:
eS('getRecommendations', {
variantId: 'r362v614',
'filters': {
'include': [{'name': 'city', values: ['Kiev','Kharkiv']}]
}
},
function(error, products) {
if (error) {
console.error(error);
return;
}
}
);
Request parameters:
Name |
Type |
Description |
filters | Optional Object |
A parameter that includes filtering rules. |
include | Optional List |
Strict filtering: recommend only products according to the given parameters. For example, show only products of a certain brand. |
exclude | Optional List |
Strict filtering: products with specified parameters are not shown. For example, do not show discount items. |
should | Optional List |
Non-strict filtering: products with specified parameters |
name |
Required |
The name of the product parameter from the product feed. |
values | Required List |
List of values to filter. The comma in values is the OR operator (values: ['Kiev','Kharkiv']). |
You can also define a field (parameter) by which product categories will be filtered in the feed for display in recommendations. To do this, specify the desired categoryField value in the request.
Example request:
eS('getRecommendations', {
variantId: 'r1673v2111',
categoryKey: 'BATHROOM',
categoryField:'tags_all_category_names'
},
function(error, products) {
if (error) {
console.error(error);
return;
}
}
);
where tags_all_category_names guarantees a search across all values in the category tree.
To set the appearance of recommendation blocks in eSputnik, please read this guide.