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 Subscription
- 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
Transferring Website Behavior Data via REST API
Send the user behavior data and use it to create personalized product recommendations for the site and for your emails.
You can send events through one of the methods:
- Using eS.JS;
- Using REST API.
Important
When setting up tracking via the REST API, the recommendations functionality on the site will not be available, in this case, you need to use the option of calling eS.JS functions
In this article, we will explain how to use the second method.
Request headers
POST / HTTP/1.1 Host: https://tracker.yespo.io/api/v2 Content-type: application/json |
Response status code is 200: No authorization is required.
ProductPage
Description
To display correct recommended products or product categories or send triggers for abandoned browses, send a request with data on:
- Product card the user is currently viewing;
- Product price and availability.
Example
{
"GeneralInfo": {
"eventName": "ProductPage",
"siteId": "8A412DC",
"datetime":1579622183208,
"externalCustomerId": "1234509876",
"user_phone": "1-541-754-3010",
"user_email": "user@mail.com",
"user_name": "Gregori Boczynski",
"user_es_contact_id": "255830499",
"cookies": {
"sc": "CDA68358-94FB-4D83-9655-3FEB3C4114A3"
}
},
"ProductPage": {
"Product": {
"productKey": "72354",
"price": "754 USD",
"isInStock": "1",
"tag_something": [
"abc",
"bca"
]
},
"Tags": {
"some_tags": [
"some_tag1",
"some_tag2"
]
}
}
}
Parameters
Name |
Example | Description |
GeneralInfo |
Required Type: object |
General information |
eventName |
“ProductPage” Type: string |
Event name |
siteId |
“8A412DC” Type: string |
|
externalCustomerId | "1234509876" Optional Type: string |
External identifier generated in your system |
user_phone |
"1-541-754-3010" Type: string |
Phone number in the international format |
user_email |
"user@mail.com" Type: string |
User email |
user_name |
"Gregori Boczynski" Type: string |
User name and surname |
user_es_contact_id |
"255830499" type: string |
User ID in the CDP |
cookies |
"CDA68358-94FB-4D83-9655-3FEB3C4114A3" Type: object, string |
Cookie sc is a cookie generated by our script if it is installed on your site. Each cookie must be unique for each user. You can create your own cookies. Example of calling this cookie from javascript document.cookie, the cookie we need is named “sc” |
datetime |
1579622183208 |
Timestamp (millisecond) |
ProductPage |
Required Type: object |
Event description |
productKey |
“72354” Type: string |
|
price |
“754 USD” Type: string |
|
isinStock |
“1” Type: int |
"0" – items are out of stock; "1" – items are in stock.
|
tag_[something] |
["abc","bca"] Type: array of strings |
|
Tags |
Optional Type: object |
Additional fields |
StatusCart
Description
An event is sent after the cart status (with a new GUID) is changed, for example, after clicking a Buy button on the category page. The cart status should be updated from all pages. If the cart is empty, then you need to send an empty cart event (empty array without products).
Example
{
"GeneralInfo": {
"eventName": "StatusCart",
"siteId": "8A412DC",
"datetime":1579622183208,
"externalCustomerId": "1234509876",
"user_phone": "1-541-754-3010",
"user_email": "user@mail.com",
"user_name": "Gregori Boczynski",
"user_es_contact_id": "255830499",
"cookies": {
"sc": "CDA68358-94FB-4D83-9655-3FEB3C4114A3"
}
},
"StatusCart": {
"GUID": "6F9619FF-8B86-D011-B42D-00CF4FC964FF",
"Products": [
{
"productKey": "430738",
"price": 201.95,
"discount": 180,
"quantity": 1,
"price_currency_code": "USD",
"tag_something": [
"aaa",
"bbb"
]
},
{
"productKey": "902339",
"price": 596,
"discount": 590,
"quantity": 1,
"price_currency_code": "USD",
"tag_something": [
"aaa",
"bbb"
]
}
],
"Tags": {
"some_tags": [
"1",
"a2"
],
"some_tags1": [
"4",
"gg"
]
}
}
}
Parameters
Name | Example | Description |
GeneralInfo |
Required Type: object, string |
General information |
eventName |
“StatusCart” Type: string |
Event name |
siteId |
“8A412DC” Type: string |
|
externalCustomerId | "1234509876" Optional Type: string |
External identifier generated in your system |
user_phone |
"1-541-754-3010" Type: string |
Phone number in the international format |
user_email |
"user@mail.com" Type: string |
User email |
user_name |
"Gregori Boczynski" Type: string |
User name and surname |
user_es_contact_id |
"255830499" Type: string |
User ID in the platform |
datetime | 1579622183208 | Timestamp (millisecond) |
GUID |
“6F9619FF-8B86-D011-B42D-00CF4FC964FF” Type: string |
|
StatusCart |
Required Type: object, string |
|
productKey |
“430738” Type: string |
|
price |
“201.95” Type: string |
Price per item |
discount |
“180” Type: string |
Discount per item |
quantity |
“1” Type: Int |
Quantity of items |
price_currency_code |
“USD” Type: string |
Currency |
tag_[something] |
["abc","bca"] Type: array of strings |
|
Tags |
Optional Type: object |
Additional fields |
Wishlist
Description
Sending the AddToWishlist event - at the time of adding a product to the wish list (favorites).
Necessary for calculating and displaying recommendations and sending triggers related to the wish list.
Example
{
"GeneralInfo": {
"eventName": "AddToWishlist",
"siteId": "8A412DC",
"datetime":1579622183208,
"externalCustomerId": "1234509876",
"user_phone": "1-541-754-3010",
"user_email": "user@mail.com",
"user_name": "Gregori Boczynski",
"user_es_contact_id": "255830499",
"cookies": {
"sc": "CDA68358-94FB-4D83-9655-3FEB3C4114A3"
}
},
"AddToWishlist": {
"Product": {
"productKey": "72354",
"price": "754",
"isInStock": "1",
"tag_something": [
"abc",
"bca"
]
},
"Tags": {
"some_tags": [
"some_tag1",
"some_tag2"
]
}
}
}
Parameters
Name |
Example | Description |
GeneralInfo |
Required Type: object |
General information |
eventName |
“AddToWishlist” Type: string |
Event name |
siteId |
“8A412DC” Type: string |
|
externalCustomerId | "1234509876" Optional Type: string |
External identifier generated in your system |
user_phone |
"1-541-754-3010" Type: string |
Phone number in the international format |
user_email |
"user@mail.com" Type: string |
User email |
user_name |
"Gregori Boczynski" Type: string |
User name and surname |
user_es_contact_id |
"255830499" type: string |
User ID in the CDP |
datetime |
1579622183208 |
Timestamp (millisecond) |
AddToWishlist |
Required Type: object |
Event description |
productKey |
“72354” Type: string |
|
price |
“754 USD” Type: string |
The price per item. |
tag_[something] |
["abc","bca"] Type: array of strings |
|
Tags |
Optional Type: object |
Additional fields |
PurchasedItems
Description
To display recommendations on the order confirmation page or to send triggers for abandoned carts, you need to send a request that will indicate which product the user purchased.
Example
{
"GeneralInfo": {
"eventName": "PurchasedItems",
"siteId": "8A412DC",
"datetime":1579622183208,
"externalCustomerId": "1234509876",
"user_phone": "1-541-754-3010",
"user_email": "user@mail.com",
"user_name": "Gregori Boczynski",
"user_es_contact_id": "255830499",
"cookies": {
"sc": "CDA68358-94FB-4D83-9655-3FEB3C4114A3"
}
},
"PurchasedItems": {
"Products": [
{
"product_id": "430738",
"unit_price": "201.95",
"quantity": 1
},
{
"product_id": "211452",
"unit_price": "341.80",
"quantity": 2
}
],
"OrderNumber": "123/2017",
"Tags": {
"some_tags1": [
"4",
"gg"
]
}
}
}
Parameters
Name | Example | Description |
GeneralInfo |
Required Type: object, string |
General information |
eventName |
“StatusCart” Type: string |
Event name |
siteId |
“8A412DC” Type: string |
|
externalCustomerId | "1234509876" Optional Type: string |
External identifier generated in your system |
user_phone |
"1-541-754-3010" Type: string |
Phone number in the international format |
user_email |
"user@mail.com" Type: string |
User email |
user_name |
"Gregori Boczynski" Type: string |
User name and surname |
user_es_contact_id |
"255830499" Type: string |
User ID in our CDP |
datetime | 1579622183208 |
Timestamp (millisecond) |
cookies |
"CDA68358-94FB-4D83-9655-3FEB3C4114A3" Type: object, string |
Cookie sc is a cookie generated by our script if it is installed on your site. Each cookie must be unique for each user. You can create your own cookies. Example of calling this cookie from javascript document.cookie, the cookie we need is named “sc” |
OrderNumber |
“123/2017” Type: string |
|
PurchasedItems | Type: array of strings | List of items |
product_id |
“430738” Type: string |
|
unit_price |
“201.95” Type: string |
Price per item |
quantity |
“1” Type: Integer |
Quantity of items |
Tags |
Optional Type: object |
Additional fields |
ProductImpressions
Description
The event that transfers data on the block display. It’s sent by default through JS API. You don’t need to send it additionally. If the script is not installed, transfer according to the format.
Example
{
"GeneralInfo": {
"eventName": "ProductImpressions",
"siteId": "8A412DC",
"datetime":1579622183208,
"externalCustomerId": "1234509876",
"user_phone": "1-541-754-3010",
"user_email": "user@mail.com",
"user_name": "Gregori Boczynski",
"user_es_contact_id": "255830499",
"cookies": {
"sc": "CDA68358-94FB-4D83-9655-3FEB3C4114A3"
}
},
"ProductImpression": {
"Products": [
{
"product_id": "430968",
"container_type": "1253"
},
{
"product_id": "430738",
"container_type": "1254"
},
{
"product_id": "429983",
"container_type": "1255"
}
],
"Tags": {
"some_tags": [
"1",
"a2"
],
"some_tags1": [
"4",
"gg"
]
}
}
}
Parameters
Name | Example | Description |
GeneralInfo |
Required Type: object |
General information |
eventName |
“ProductImpressions” Type: string |
Event name |
siteId |
“8A412DC” Type: string |
|
externalCustomerId | "1234509876" Optional Type: string |
External identifier generated in your system |
user_phone |
"1-541-754-3010" Type: string |
Phone number in the international format |
user_email |
"user@mail.com" Type: string |
User email |
user_name |
"Gregori Boczynski" Type: string |
User name and surname |
user_es_contact_id |
"255830499" Type: string |
User ID in our platform |
datetime | 1579622183208 | Timestamp (millisecond) |
cookies |
"CDA68358-94FB-4D83-9655-3FEB3C4114A3" Type: object, string |
Cookie sc is a cookie generated by our script if it is installed on your site. Each cookie must be unique for each user. You can create your own cookies. Example of calling this cookie from javascript document.cookie, the cookie we need is named “sc” |
ProductImpressions |
Required Type: array of objects |
|
product_id |
“430738” Type: string |
ID of the product or category that is in the feed |
container_type |
“1253” Type: string |
Recommendation block number. You can get the container_type in response to a request for recommendations |
Tags |
Optional Type: object |
Additional fields |
CategoryPage
Description
Can be used to send data on:
- Triggers;
- Category browses without product card viewing;
- Site browses without category or product card viewing.
You need to send a request with the data on the category the user is currently browsing.
Example
{
"GeneralInfo": {
"eventName": "CategoryPage",
"siteId": "8A412DC",
"datetime":1579622183208,
"externalCustomerId": "1234509876",
"user_phone": "1-541-754-3010",
"user_email": "user@mail.com",
"user_name": "Gregori Boczynski",
"user_es_contact_id": "255830499",
"cookies": {
"sc": "CDA68358-94FB-4D83-9655-3FEB3C4114A3"
}
},
"CategoryPage": {
"Category": {
"categoryKey": "509876"
},
"Tags": {
"some_tags": [
"1",
"a2"
],
"some_tags1": [
"4",
"gg"
]
}
}
}
Parameters
Name | Example | Description |
GeneralInfo |
Required Type: object |
General information |
eventName |
“ProductPage” Type: string |
Event name |
siteId |
“8A412DC” Type: string |
|
externalCustomerId | "1234509876" Optional Type: string |
External identifier generated in your system |
user_phone |
"1-541-754-3010" Type: string |
Phone number in the international format |
user_email |
"user@mail.com" Type: string |
User email |
user_name |
"Gregori Boczynski" Type: string |
User’s name and surname |
user_es_contact_id |
"255830499" Type: string |
User ID in the CDP |
datetime | 1579622183208 | Timestamp (millisecond) |
cookies |
"CDA68358-94FB-4D83-9655-3FEB3C4114A3" Type: object, string |
Cookie sc is a cookie generated by our script if it is installed on your site. Each cookie must be unique for each user. You can create your own cookies. Example of calling this cookie from javascript document.cookie, the cookie we need is named “sc” |
CategoryPage |
Required Type: object |
Event description |
categoryKey |
“509876” Type: string |
ID of the product or category according to a product feed |
Tags |
Optional Type: object |
Additional fields |
CustomerData
Description
To send triggers for abandoned browses or abandoned carts, you need to send a request with the data on the user.
Email should be sent at least in the personal account, on the page "Thank you for the order" and during registration.
Example
{
"GeneralInfo": {
"eventName": "CustomerData",
"siteId": "8D3869C",
"datetime":1579622183208,
"externalCustomerId": "1234509876",
"user_phone": "3801111111111",
"user_email": "user@mail.com",
"user_es_contact_id": "255830499",
"user_name": "Johny",
"cookies": {
"sc": "CDA68358-94FB-4D83-9655-3FEB3CGGG1"
}
}
}
Parameters
Name | Example | Description |
GeneralInfo |
Required Type: array of objects |
General information |
eventName |
“StatusCart” Type: string |
Event name |
siteId |
“8A412DC” Type: string |
|
externalCustomerId | "1234509876" Optional Type: string |
External identifier generated in your system |
user_phone |
"1-541-754-3010" Type: string |
Phone number in the international format |
user_email |
"user@mail.com" Optional Type: string |
User email |
user_name |
"Gregori Boczynski" Type: string |
User name and surname |
user_es_contact_id |
"255830499" Optional Type: string |
User ID in the platform |
datetime | 1579622183208 | Timestamp (millisecond) |
cookies |
"CDA68358-94FB-4D83-9655-3FEB3C4114A3" Type: object, string |
Cookie sc is a cookie generated by our script if it is installed on your site. Each cookie must be unique for each user. You can create your own cookies. Example of calling this cookie from javascript document.cookie, the cookie we need is named “sc” |
SearchRequest
Description
To collect statistics on search queries, you need to send the value from the search line.
Use this event for triggers. Send it only if the search returned no results. In the trigger, such contacts will receive personal recommendations (at the moment, recommendations don’t depend on the value entered in the search, we will support this feature in the nearest future).
Example
{
"GeneralInfo": {
"eventName": "SearchRequest",
"siteId": "CE460EC",
"datetime": 1668792552000,
"externalCustomerId": "1234509876",
"user_phone": "1-541-754-3010",
"user_email": "userdech123@mail.com",
"user_name": "Gregori Boczynski",
"user_es_contact_id": "",
"cookies": {
"sc": "CDA68358-94FB-4D83-9655-3FEB3C4114A3"
}
},
"SearchRequest": {
"search": "input_value",
"isFound": 1
}
}
Parameters
Name | Example | Description |
search | "Coffe" Required Type: string |
Value from the search string. What we are looking for on the site. |
isFound | 1/0 Optional Type: int |
If the list is empty, it returns 0 otherwise 1 |
ProductUpdate
Description
ProductUpdate is an optional event that updates product data in Yespo in real-time, regardless of the scheduled feed update. Pass product properties that need constant updating — price, discount, availability, etc.
Example
{
"GeneralInfo": {
"eventName": "ProductUpdate",
"siteId": "site_id"
},
"ProductUpdate": [
{
"brand": "Apple",
"name": "iPhone 7",
"description": "Some description",
"product_id": "430738",
"imgurl": "https://domain.com/apple/product_large.png",
"url": "https://domain.com/apple/product_page_example.html",
"unit_price": "201.95",
"isInStock": "1",
"tag_discount": ["10"],
"tag_oldprice": ["224.38"],
"price_currency_code": "UAH",
"category_id": ["3"],
"tag_something": [
"aaa",
"bbb"
]
},
{
"brand": "Apple",
"name": "iPhone 7",
"description": "Some description",
"product_id": "430738",
"imgurl": "https://domain.com/apple/product_large.png",
"unit_price": "201.95",
"isInStock": "1",
"tag_discount": ["10"],
"tag_oldprice": ["224.38"],
"price_currency_code": "UAH",
"category": "level1 > level2 > level3",
"category_id": ["1", "2", "3"],
"tag_something": [
"aaa",
"bbb"
]
}
]
}
Parameters
Name | Example | Description |
ProductUpdate |
Required Type: Object |
An array of updated products and their parameters |
siteId |
site_id Required Type: String |
Site name |
product_id |
430738 Required Type: Int |
Product ID |
isInStock |
1 Required, can be 0 or 1 Type: Int |
"0" – items are out of stock; "1" – items are in stock.
|
unit_price |
201.95 Optional Type: Int |
Unit price |
description |
Some description Optional Type: String |
Product description |
name |
iPhone 7 Optional Type: String |
Product name
|
imgurl |
https://domain.com/apple/product_large.png Optional Type: String |
Image URL |
url |
https://domain.com/apple/product_page_example.html Optional Type: String |
Product page URL |
brand |
Apple Optional Type: String |
Brand name
|
tag_discount |
10 Optional, should be a relative figure (%) Type: Int |
Discount
|
price_currency_code |
UAH Optional Type: Int |
Price currency code |
tag_oldprice |
224.38 Optional Type: Int |
Old price |
If the product has a discount, you can pass the next parameters:
{
"product_id": "1111",
"unit_price": "270",
"isInStock": 1,
"price_currency_code": "UAH",
"tag_oldprice": [
"300"
],
"tag_discount": [
"10"
]
}
And if the product has not a discount, than:
{
"product_id": "1111",
"unit_price": "270",
"isInStock": 1,
"price_currency_code": "UAH"
}