Ecommerce Events

Updated

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 actionsThe 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. for any of our ecommerce-supporting integrations. This means can use our out-of-the-box actions without having to map your incoming data to each outbound integration.

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.

 Examples in this section are based on our JavaScript library

To simplify the examples on this page, we’ve based everything on our JavaScript client. But you can send ecommerce events from any of our libraries.

Browsing products

Browsing events represent key events that a customer might have while browsing for products.

ActionDescription
Products SearchedUser searched for products
Product List ViewedUser viewed a product list or category
Product List FilteredUser filtered a product list or category
cioanalytics.track('Products Searched', {
  query: "pepperoni pizza"
})
  • query string
    The search query the customer entered.

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.

ActionDescription
Promotion ViewedUser viewed promotion
Promotion ClickedUser clicked on promotion
cioanalytics.track('Promotion Viewed', {
  promotion_id: "promo-123",
  creative: "top_banner_2",
  name: "75% store-wide shoe sale",
  position: "banner_slot_1"
})

Product order overview

These events represent the typical lifecycle of a product order.

ActionDescription
Product ClickedUser clicked on a product
Product ViewedUser viewed a product details
Product AddedUser added a product to their shopping cart
Product RemovedUser removed a product from their shopping cart
Cart ViewedUser viewed their shopping cart
Checkout StartedUser 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 ViewedUser viewed a checkout step. You can have as many checkout steps as you want.
Checkout Step CompletedUser completed a checkout step. You can have as many checkout steps as you want.
Payment Info EnteredUser added payment information
Order CompletedUser completed the order
Order UpdatedUser updated the order
Order RefundedUser refunded the order
Order CancelledUser cancelled the order
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
})

    Coupons overview

    Send coupon events when your customers enter, apply, or remove coupons from their shopping carts or orders.

    ActionDescription
    Coupon EnteredUser entered a coupon on a shopping cart or order
    Coupon AppliedCoupon was applied on a user’s shopping cart or order
    Coupon DeniedCoupon was denied from a user’s shopping cart or order
    Coupon RemovedUser removed a coupon from a cart or order
    cioanalytics.track('Coupon Entered', {
      order_id: "order123",
      cart_id: "cool_persons_cart_123",
      coupon_id: "NEWUSER20"
    })
    
    • cart_id string
      The ID of the cart that the coupon applies to (if applicable).
    • coupon_id string
      the coupon ID the person entered.
    • order_id string
      The order/transaction the coupon applies to (if applicable).

    Wishlisting overview

    Send these events if your ecommerce app supports wishlist features.

    ActionDescription
    Product Added to WishlistUser added a product to the wish list
    Product Removed from WishlistUser removed a product from the wish list
    Wishlist Product Added to CartUser added a wishlist product to the cart
    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"
    })
    

      Sharing overview

      If your store integrates with social apps or or supports sharing, you can send events when your customers share product information.

      ActionDescription
      Product SharedShared a product with one or more friends
      Cart SharedShared the cart with one or more friends
      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"
      })
      
      • brand string
        The brand associated with the product.
      • category string
        The product category a person viewed.
      • image_url string
        The URL of the product image.
      • name string
        The name of the product a person viewed.
      • price number
        The price of the product.
      • recipient string
        The person the product was shared with.
      • share_message string
        The message the customer sent with the share.
      • share_via string
        The channel the product was shared through.
      • sku string
        The stock keeping unit (SKU) of the product a person viewed.
      • url string
        The URL of the product page.
      • variant string
        The variant of the product a person viewed, if applicable.

      Reviewing overview

      Send the Product Reviewed event when customers review products in your store.

      ActionDescription
      Product ReviewedUser reviewed a product
      cioanalytics.track('Product Reviewed', {
        product_id: "coolshoes-123",
        review_id: "review_123",
        review_body: "These shoes are great!",
        rating: 5
      })
      
      • rating integer
        The rating the customer gave the product.
      • review_body string
        The body of the review.
      • review_id string
        The ID of the review.
      Copied to clipboard!
        Contents