Ecommerce events
How it works
Ecommerce track events typically contain the same information across platforms—products, brands, orders, cart information, etc. However, each place you send this data to might map this information differently.
Our ecommerce specification helps you send events in a uniform format that maps to the actions The source event and data that triggers an API call to your destination. For example, an incoming identify event from your sources adds or updates a person in our Customer.io Journeys destination.
Handling arrays of products
Some data-out integrations don’t take arrays. In these cases, you may need to flatten arrays of products. See the documentation for your integration to learn more information about supported events and properties.
Event lifecycles
You can see a complete list of ecommerce events and all associated properties on our Pipelines API reference page. But it can also help to understand the typical events that a person may perform and the order they’re likely to perform them in, as they browse and buy products.
Browsing products
Browsing events represent key events that a customer might have while browsing for products.
| Action | Description |
|---|---|
| Products Searched | User searched for products |
| Product List Viewed | User viewed a product list or category |
| Product List Filtered | User filtered a product list or category |
Products Searched
cioanalytics.track('Products Searched', {
query: "pepperoni pizza"
})- querystringThe search query the customer entered.
Product List Viewed
cioanalytics.track('Product List Viewed', {
list_id: 'hot_deals_1',
category: 'Deals',
products: [
{
product_id: "coolshoes-123"
sku: "abc-123-xyz"
category: "shoes"
name: "Cool Shoes"
brand: "A Shoe Brand"
price: 139.99
position: 1
url: "https://www.example.com/product/123"
image_url: "https://www.example.com/product/123.jpg"
},
{
product_id: "coolshoes-456"
sku: "abc-456-xyz"
category: "shoes"
name: "Even Cooler Shoes"
brand: "A Different Shoe Brand"
price: 159.99
position: 2
url: "https://www.example.com/product/456"
image_url: "https://www.example.com/product/456.jpg"
}
]
});- list_idstringThe product list a person viewed.
- categorystringThe product category a person viewed.
- The products displayed in the product list. Each object in the array represents a product.
Product List Filtered
cioanalytics.track('Product List Filtered', {
list_id: "all_shoes",
category: "shoes",
products: [
{
product_id: "coolshoes-123",
sku: "abc-123-xyz",
category: "shoes",
name: "Cool Shoes",
brand: "A Shoe Brand",
variant: "red",
price: 139.99,
quantity: 1,
coupon: "NEWUSER20",
position: 3,
url: "https://www.example.com/product/123",
image_url: "https://www.example.com/product/123.jpg"
}
],
filters: [
{
type: "string",
value: "string"
}
],
sorts: [
{
type: "string",
value: "string"
}
]
})- list_idstringThe product list a person viewed.
- categorystringThe product category a person viewed.
- The products displayed in the product list. Each object in the array represents a product.
- The filters a person applied to the product list, where each object in the array is a different filter.
- The sorts a person applied to the product list, where each object in the array is a different sort.
Promotions overview
Promotion events let you know when someone sees or interacts with offers within your app. For example, you might send a Promotion Viewed event when your app shows a banner advertisement to a user. If the user clicks the ad, you’d send the Promotion Clicked event.
| Action | Description |
|---|---|
| Promotion Viewed | User viewed promotion |
| Promotion Clicked | User clicked on promotion |
Promotion Viewed
cioanalytics.track('Promotion Viewed', {
promotion_id: "promo-123",
creative: "top_banner_2",
name: "75% store-wide shoe sale",
position: "banner_slot_1"
})- promotion_idstringThe ID of the promotion a person viewed.
- creativestringThe creative content ID associated with the promotion.
- namestringThe name of the promotion a person viewed.
- positionstringThe position of the promotion a person viewed.
Promotion Clicked
cioanalytics.track('Promotion clicked', {
promotion_id: "promo-123",
creative: "top_banner_2",
name: "75% store-wide shoe sale",
position: "banner_slot_1"
})- promotion_idstringThe ID of the promotion a person viewed.
- creativestringThe creative content ID associated with the promotion.
- namestringThe name of the promotion a person viewed.
- positionstringThe position of the promotion a person viewed.
Product order overview
These events represent the typical lifecycle of a product order.
| Action | Description |
|---|---|
| Product Clicked | User clicked on a product |
| Product Viewed | User viewed a product details |
| Product Added | User added a product to their shopping cart |
| Product Removed | User removed a product from their shopping cart |
| Cart Viewed | User viewed their shopping cart |
| Checkout Started | User initiated the order process (a transaction is created) You should send this event on the page that the customer lands on after they click Checkout (or a similar button). |
| Checkout Step Viewed | User viewed a checkout step. You can have as many checkout steps as you want. |
| Checkout Step Completed | User completed a checkout step. You can have as many checkout steps as you want. |
| Payment Info Entered | User added payment information |
| Order Completed | User completed the order |
| Order Updated | User updated the order |
| Order Refunded | User refunded the order |
| Order Cancelled | User canceled the order |
Product Clicked
cioanalytics.track('Product Clicked', {
product_id: "coolshoes-123"
sku: "abc-123-xyz"
category: "shoes"
name: "Cool Shoes"
brand: "A Shoe Brand"
variant: "red"
price: 139.99
quantity: 1
coupon: "NEWUSER20"
position: 3
url: "https://www.example.com/product/123"
image_url: "https://www.example.com/product/123.jpg"
currency: "USD"
value: 119.99
})- currencystringThe currency of the transaction.
- valuenumberThe total value of the product, after multiplying by quantity.
Product Viewed
cioanalytics.track('Product Viewed', {
product_id: "coolshoes-123"
sku: "abc-123-xyz"
category: "shoes"
name: "Cool Shoes"
brand: "A Shoe Brand"
variant: "red"
price: 139.99
quantity: 1
coupon: "NEWUSER20"
position: 3
url: "https://www.example.com/product/123"
image_url: "https://www.example.com/product/123.jpg"
currency: "USD"
value: 119.99
})- currencystringThe currency of the transaction.
- valuenumberThe total value of the product, after multiplying by quantity.
Product Added
cioanalytics.track('Product Added', {
product_id: "coolshoes-123"
sku: "abc-123-xyz"
category: "shoes"
name: "Cool Shoes"
brand: "A Shoe Brand"
variant: "red"
price: 139.99
quantity: 1
coupon: "NEWUSER20"
position: 3
url: "https://www.example.com/product/123"
image_url: "https://www.example.com/product/123.jpg"
currency: "USD"
value: 119.99
})- cart_idstringThe cart ID the product was added to.
Product Removed
cioanalytics.track('Product Removed', {
product_id: "coolshoes-123"
sku: "abc-123-xyz"
category: "shoes"
name: "Cool Shoes"
brand: "A Shoe Brand"
variant: "red"
price: 139.99
quantity: 1
coupon: "NEWUSER20"
position: 3
url: "https://www.example.com/product/123"
image_url: "https://www.example.com/product/123.jpg"
currency: "USD"
value: 119.99
})- cart_idstringThe cart ID the product was removed from.
Cart Viewed
cioanalytics.track('Cart Viewed', {
cart_id: "cool_persons_cart_123",
products: [
{
product_id: "coolshoes-123",
sku: "abc-123-xyz",
category: "shoes",
name: "Cool Shoes",
brand: "A Shoe Brand",
variant: "red",
price: 139.99,
quantity: 1,
coupon: "NEWUSER20",
position: 3,
url: "https://www.example.com/product/123",
image_url: "https://www.example.com/product/123.jpg"
}
]
})- cart_idstringThe cart ID a person viewed.
- The products in the cart. Each object in the array represents a product.
Checkout Started
cioanalytics.track('Checkout Started', {
order_id: "cool_persons_cart_123",
affiliation: "Shopify",
revenue: 139.99,
shipping: 5,
tax: 10,
discount: 20,
coupon: "NEWUSER20",
currency: "USD",
products: [
{
product_id: "coolshoes-123",
sku: "abc-123-xyz",
category: "shoes",
name: "Cool Shoes",
brand: "A Shoe Brand",
variant: "red",
price: 139.99,
quantity: 1,
coupon: "NEWUSER20",
position: 3,
url: "https://www.example.com/product/123",
image_url: "https://www.example.com/product/123.jpg"
}
]
})- valuenumberThe expected total revenue of the transaction calculated with discounts/coupons.
Checkout Step Viewed
cioanalytics.track('Checkout Step Viewed', {
checkout_id: "cool_persons_checkout_123",
step: 2,
shipping_method: "ground",
payment_method: "Visa"
})- checkout_idstringThe checkout/transaction ID.
- stepintegerThe step number of the checkout process.
- shipping_methodstringThe shipping method selected by the user.
- payment_methodstringThe payment method selected by the user.
Checkout Step Completed
cioanalytics.track('Checkout Step Completed', {
checkout_id: "cool_persons_checkout_123",
step: 2,
shipping_method: "ground",
payment_method: "Visa"
})- checkout_idstringThe checkout/transaction ID.
- stepintegerThe step number of the checkout process.
- shipping_methodstringThe shipping method selected by the user.
- payment_methodstringThe payment method selected by the user.
Payment Info Entered
cioanalytics.track('Payment Info Entered', {
checkout_id: "cool_persons_checkout_123",
step: 2,
shipping_method: "ground",
payment_method: "Visa",
order_id: "order123"
})- order_idstringThe order ID.
Order Completed
cioanalytics.track('Order Completed', {
subtotal: 119.99,
products: [
{
product_id: "coolshoes-123",
sku: "abc-123-xyz",
category: "shoes",
name: "Cool Shoes",
brand: "A Shoe Brand",
variant: "red",
price: 139.99,
quantity: 1,
coupon: "NEWUSER20",
position: 3,
url: "https://www.example.com/product/123",
image_url: "https://www.example.com/product/123.jpg"
}
],
order_id: "cool_persons_cart_123",
checkout_id: "checkout123",
total: 0,
affiliation: "Shopify",
revenue: 139.99,
shipping: 5,
tax: 10,
discount: 20,
coupon: "NEWUSER20",
currency: "USD"
})- subtotalnumberThe order total after discounts but before taxes and shipping.
- The products displayed in the product list. Each object in the array represents a product.
- order_idstringThe order ID.
- checkout_idstringThe checkout/transaction ID.
- totalnumberThe total amount of the order.
Order Updated
cioanalytics.track('Order Updated', {
order_id: "cool_persons_cart_123",
affiliation: "Shopify",
revenue: 139.99,
shipping: 5,
tax: 10,
discount: 20,
coupon: "NEWUSER20",
currency: "USD",
products: [
{
product_id: "coolshoes-123",
sku: "abc-123-xyz",
category: "shoes",
name: "Cool Shoes",
brand: "A Shoe Brand",
variant: "red",
price: 139.99,
quantity: 1,
coupon: "NEWUSER20",
position: 3,
url: "https://www.example.com/product/123",
image_url: "https://www.example.com/product/123.jpg"
}
]
})- The products displayed in the product list. Each object in the array represents a product.
Order Refunded
cioanalytics.track('Order Refunded', {
order_id: "order123",
affiliation: "Shopify",
revenue: 139.99,
shipping: 5,
tax: 10,
discount: 20,
coupon: "NEWUSER20",
currency: "USD",
products: [
{
product_id: "coolshoes-123",
sku: "abc-123-xyz",
category: "shoes",
name: "Cool Shoes",
brand: "A Shoe Brand",
variant: "red",
price: 139.99,
quantity: 1,
coupon: "NEWUSER20",
position: 3,
url: "https://www.example.com/product/123",
image_url: "https://www.example.com/product/123.jpg"
}
],
total: 119.99,
subtotal: 119.99,
checkout_id: "checkout123"
})- The products displayed in the product list. Each object in the array represents a product.
- totalnumberThe total amount refunded.
- subtotalnumberThe order total after discounts but before taxes and shipping.
- order_idstringThe order ID.
- checkout_idstringThe checkout/transaction ID.
Order Cancelled
cioanalytics.track('Order Cancelled', {
order_id: "order123",
affiliation: "Shopify",
revenue: 139.99,
shipping: 5,
tax: 10,
discount: 20,
coupon: "NEWUSER20",
currency: "USD",
products: [
{
product_id: "coolshoes-123",
sku: "abc-123-xyz",
category: "shoes",
name: "Cool Shoes",
brand: "A Shoe Brand",
variant: "red",
price: 139.99,
quantity: 1,
coupon: "NEWUSER20",
position: 3,
url: "https://www.example.com/product/123",
image_url: "https://www.example.com/product/123.jpg"
}
],
total: 119.99
})- order_idstringThe cancelled order ID.
- The products displayed in the product list. Each object in the array represents a product.
- totalnumberThe total amount of the order.
Coupons overview
Send coupon events when your customers enter, apply, or remove coupons from their shopping carts or orders.
| Action | Description |
|---|---|
| Coupon Entered | User entered a coupon on a shopping cart or order |
| Coupon Applied | Coupon was applied on a user’s shopping cart or order |
| Coupon Denied | Coupon was denied from a user’s shopping cart or order |
| Coupon Removed | User removed a coupon from a cart or order |
Coupon Entered
cioanalytics.track('Coupon Entered', {
order_id: "order123",
cart_id: "cool_persons_cart_123",
coupon_id: "NEWUSER20"
})- order_idstringThe order/transaction the coupon applies to (if applicable).
- cart_idstringThe ID of the cart that the coupon applies to (if applicable).
- coupon_idstringthe coupon ID the person entered.
Coupon Applied
cioanalytics.track(‘Coupon Applied’, { order_id: “order123”, cart_id: “cool_persons_cart_123”, coupon_id: “NEWUSER20”, coupon_name: “$20 off for new users”, discount: 20 })
- order_idstringThe order/transaction the coupon applies to (if applicable).
- cart_idstringThe ID of the cart that the coupon applies to (if applicable).
- coupon_idstringthe coupon ID the person entered.
- coupon_namestringThe name of the coupon, if applicable.
- discountnumberThe discount applied through the coupon. This is the ammount subtracted from the
totalin other transaction events.
Coupon Denied
cioanalytics.track(‘Coupon Applied’, { order_id: “order123”, cart_id: “cool_persons_cart_123”, coupon_id: “NEWUSER20”, coupon_name: “$20 off for new users”, reason: “Not customer’s first order” })
- order_idstringThe order/transaction the coupon applies to (if applicable).
- cart_idstringThe ID of the cart that the coupon applies to (if applicable).
- coupon_idstringthe coupon ID the person entered.
- coupon_namestringThe name of the coupon, if applicable.
- reasonstringThe reason the coupon was denied.
Coupon Removed
cioanalytics.track(‘Coupon Removed’, { order_id: “order123”, cart_id: “cool_persons_cart_123”, coupon_id: “NEWUSER20”, coupon_name: “$20 off for new users”, discount: 20 })
- order_idstringThe order/transaction the coupon applies to (if applicable).
- cart_idstringThe ID of the cart that the coupon applies to (if applicable).
- coupon_idstringthe coupon ID the person entered.
- coupon_namestringThe name of the coupon, if applicable.
- discountnumberThe discount applied through the coupon. This is the ammount subtracted from the
totalin other transaction events.
Wishlisting overview
Send these events if your ecommerce app supports wishlist features.
| Action | Description |
|---|---|
| Product Added to Wishlist | User added a product to the wish list |
| Product Removed from Wishlist | User removed a product from the wish list |
| Wishlist Product Added to Cart | User added a wishlist product to the cart |
Product Added to Wishlist
cioanalytics.track('Product Added to Wishlist', {
wishlist_id: "wishlist123",
wishlist_name: "Favorite Shoes",
product_id: "coolshoes-123",
sku: "abc-123-xyz",
category: "shoes",
name: "Cool Shoes",
brand: "A Shoe Brand",
variant: "red",
price: 139.99,
quantity: 1,
coupon: "NEWUSER20",
position: 3,
url: "https://www.example.com/product/123",
image_url: "https://www.example.com/product/123.jpg"
})- wishlist_idstringThe ID of the wishlist that the product applies to.
- wishlist_namestringThe name of the wishlist that the product applies to.
Product Removed from Wishlist
cioanalytics.track('Product Removed from Wishlist', {
wishlist_id: "wishlist123",
wishlist_name: "Favorite Shoes",
product_id: "coolshoes-123",
sku: "abc-123-xyz",
category: "shoes",
name: "Cool Shoes",
brand: "A Shoe Brand",
variant: "red",
price: 139.99,
quantity: 1,
coupon: "NEWUSER20",
position: 3,
url: "https://www.example.com/product/123",
image_url: "https://www.example.com/product/123.jpg"
})- wishlist_idstringThe ID of the wishlist that the product applies to.
- wishlist_namestringThe name of the wishlist that the product applies to.
Wishlist Product Added to Cart
cioanalytics.track('Wishlist Product Added to Cart', {
wishlist_id: "wishlist123",
wishlist_name: "Favorite Shoes",
product_id: "coolshoes-123",
sku: "abc-123-xyz",
category: "shoes",
name: "Cool Shoes",
brand: "A Shoe Brand",
variant: "red",
price: 139.99,
quantity: 1,
coupon: "NEWUSER20",
position: 3,
url: "https://www.example.com/product/123",
image_url: "https://www.example.com/product/123.jpg"
})- wishlist_idstringThe ID of the wishlist that the product applies to.
- wishlist_namestringThe name of the wishlist that the product applies to.
- cart_idstringThe ID of the cart that the product was added to.
Sharing overview
If your store integrates with social apps or supports sharing, you can send events when your customers share product information.
| Action | Description |
|---|---|
| Product Shared | Shared a product with one or more friends |
| Cart Shared | Shared the cart with one or more friends |
Product Shared
cioanalytics.track('Product Shared', {
share_via: "email",
share_message: "Check out these cool shoes!",
recipient: "friendOfcool.person@example.com",
product_id: "coolshoes-123",
sku: "abc-123-xyz",
category: "shoes",
name: "Cool Shoes",
brand: "A Shoe Brand",
variant: "red",
price: 139.99,
url: "https://www.example.com/product/123",
image_url: "https://www.example.com/product/123.jpg"
})- share_viastringThe channel the product was shared through.
- share_messagestringThe message the customer sent with the share.
- recipientstringThe person the product was shared with.
- product_idstringThe product ID.
- skustringThe stock keeping unit (SKU) of the product a person viewed.
- categorystringThe product category a person viewed.
- namestringThe name of the product a person viewed.
- brandstringThe brand associated with the product.
- variantstringThe variant of the product a person viewed, if applicable.
- pricenumberThe price of the product.
- urlstringThe URL of the product page.
- image_urlstringThe URL of the product image.
Cart Shared
cioanalytics.track('Cart Shared', {
share_via: "email",
share_message: "Check out my cart!",
recipient: "friendOfcool.person@example.com",
cart_id: "cool_persons_cart_123",
products: [
{
product_id: "coolshoes-123"
}
]
})- share_viastringThe channel the product was shared through.
- share_messagestringThe message the customer sent with the share.
- recipientstringThe person the product was shared with.
- cart_idstringThe shopping cart ID.
- An array of product IDs contained in the shared cart.
Reviewing overview
Send the Product Reviewed event when customers review products in your store.
| Action | Description |
|---|---|
| Product Reviewed | User reviewed a product |
cioanalytics.track('Product Reviewed', {
product_id: "coolshoes-123",
review_id: "review_123",
review_body: "These shoes are great!",
rating: 5
})
- product_idstringThe product ID.
- review_idstringThe ID of the review.
- review_bodystringThe body of the review.
- ratingintegerThe rating the customer gave the product.