viewed product
viewed product
Unlocked Features
- Product abandonment workflow: Enables you to automate actions when a product is viewed but not purchased. See the Product abandonment guide for more information.
- Contact segmentation: Enables targeted communication by categorizing contacts based on specific criteria.
Supported Endpoints
Endpoint | eventVersion | origin |
---|---|---|
track (JavaScript API) | v4 | api |
Example event
Below is an example event provided for testing. You can send this through the available endpoints to evaluate automation, segmentation, or any other custom functionalities.
JavaScript API:
omnisend.push([
"track",
"viewed product",
{
"origin": "api",
"eventID": "f3f61bc6-07b8-4645-92d8-189d882dbcb1",
"eventVersion": "v4",
"eventTime": "2021-07-01T00:00:00Z",
"properties": {
"page": {
"title": "Example Store - Log Product",
"url": "example.com/product/1"
},
"product": {
"categories": [
{
"id": "2131",
"title": "The best product"
}
],
"currency": "EUR",
"id": "232423",
"imageUrl": "https://example.com/product/232423-image.jpg",
"oldPrice": "4099",
"price": "2099",
"title": "The best product",
"status": "inStock",
"url": "https://example.com/product/232423"
},
"userInfo": {
"city": "Vilnius",
"country": "Lithuania",
"device": "mobile",
"language": "en",
"os": "ios",
"sessionId": "o9KSwgfgjPDhih-20240131002519"
},
"utm": {
"campaign": "Summer_sale Campaign",
"medium": "Facebook_Mobile_Feed",
"source": "Facebook_Ads"
}
}
}
]);
Property explanation & expected types
Value Path | Description | Example | Type |
---|---|---|---|
page | Page | - | object |
page.title | Title | Example Store - Log Product | string |
page.url | Url | example.com/product/1 | string |
product | Product | - | object |
product.categories | Categories | - | array of objects |
product.categories.id | Id | 2131 | string |
product.categories.title | Title | The best product | string |
product.currency | Currency code in ISO 4217 format | EUR | string |
product.description | Description | - | string |
product.id | Id | 232423 | string |
product.imageUrl | Image Url | https://example.com/product/232423-image.jpg | string |
product.oldPrice | Value in cents. Please refer to _oldPrice | 4099 | number |
product.price | Value in cents. Please refer to _price | 2099 | number |
product.title | Title | The best product | string |
product.status | Product status at the time of the event. Default values: 'inStock', 'outOfStock', 'notAvailable' | inStock | string |
product.url | URL to product page | https://example.com/product/232423 | string |
userInfo | User Info | - | object |
userInfo.city | City name. Property is resolved from IP address. | Vilnius | string |
userInfo.country | Country name. Property is resolved from IP address. | Lithuania | string |
userInfo.device | Device name. Property is resolved from user agent. | mobile | string |
userInfo.language | User selected language. Property is resolved from user agent. | en | string |
userInfo.os | User operation system. Property is resolved from user agent. | ios | string |
userInfo.sessionId | User browser session. Can be used to detect events from the same browser session. | o9KSwgfgjPDhih-20240131002519 | string |
utm | Will be only prefilled if user opened site from shared campaign link | - | object |
utm.campaign | Marketing campaign name. | Summer_sale Campaign | string |
utm.medium | From what medium user opened site. i.e 'social' | Facebook_Mobile_Feed | string |
utm.source | From what source user opened site. i.e 'facebook' | Facebook_Ads | string |