Ecommerce Statistics

Receive insights regarding your customers, cart abandonment, revenue, purchasing behavior and so much more!

Integrate Our Events And Watch Your Website Intelligence Grow.

E-commerce Events function very similarly to the custom events feature. It relies on the global va function available in the website of the user that sends the events through the worker to the API.

The function expects 3 parameters:

  1. ecom - to specify this is an e-com event

  2. The type of the events from the list below

  3. The payload of the event

The events follow a very similar structure to Google Analytics in order to ease migration.

The following events are supported:

  1. add_payment_info
  2. add_shipping_info
  3. add_to_cart
  4. add_to_wishlist
  5. begin_checkout
  6. generate_lead
  7. login
  8. purchase
  9. refund
  10. remove_from_cart
  11. share
  12. sign_up
  13. view_cart
  14. view_item
  15. view_item_list

add_payment_info


va('ecom','add_payment_info',{
  "customer": {
    "id": "internalID",
    "name": "John Smith",
    "email": "john@smith.com",
    "phoneNumber": "+4012312312312" 
  },
  "currency":"RON",
  "value":0.00,
  "method":"Credit Card"
})
		

add_shipping_info


va('ecom','add_shipping_info',{
  "customer": {
    "id": "internalID",
    "name": "John Smith",
    "email": "john@smith.com",
    "phoneNumber": "+4012312312312" 
  },
  "currency":"RON",
  "value":0.00,
  "shippingTier":"DHL"
})
		

add_to_cart


va('ecom','add_to_cart',{
  "customer": {
    "id": "internalID",
    "name": "John Smith",
    "email": "john@smith.com",
    "phoneNumber": "+4012312312312" 
  },
  "currency":"RON",
  "value":0.00,
  "items":[
    {
      "id": "SKU_123",
      "item_name": "iPhone 15",
      "affiliation": "Magazin online #1",
      "coupon": "50%OFF",
      "discount": 10,
      "index": 0,
      "item_brand": "Apple",
      "item_category": "Category 1",
      "item_category2": "Category 2",
      "item_category3": "Category 3",
      "item_category4": "Category 4",
      "item_category5": "Category 5",
      "item_list_id": "LIST-123",
      "item_list_name": "John's wishlist",
      "item_variant": "Sky Blue",
      "location_id": "Online shop #2",
      "price": 6512.30,
      "quantity": 1,
      "image_url": "https://www.apple.com/newsroom/images/2023/09/apple-unveils-iphone-15-pro-and-iphone-15-pro-max/tile/Apple-iPhone-15-Pro-lineup-hero-230912.jpg.og.jpg?202309270316"
    }
  ]
})
		

add_to_wishlist


va('ecom','add_to_wishlist',{
  "customer": {
    "id": "internalID",
    "name": "John Smith",
    "email": "john@smith.com",
    "phoneNumber": "+4012312312312" 
  },
  "currency":"RON",
  "value":0.00,
  "items":[
    {
      "id": "SKU_123",
      "item_name": "iPhone 15",
      "affiliation": "Magazin online #1",
      "coupon": "50%OFF",
      "discount": 10,
      "index": 0,
      "item_brand": "Apple",
      "item_category": "Category 1",
      "item_category2": "Category 2",
      "item_category3": "Category 3",
      "item_category4": "Category 4",
      "item_category5": "Category 5",
      "item_list_id": "LIST-123",
      "item_list_name": "John's wishlist",
      "item_variant": "Sky Blue",
      "location_id": "Online shop #2",
      "price": 6512.30,
      "quantity": 1,
      "image_url": "https://www.apple.com/newsroom/images/2023/09/apple-unveils-iphone-15-pro-and-iphone-15-pro-max/tile/Apple-iPhone-15-Pro-lineup-hero-230912.jpg.og.jpg?202309270316"
    }
  ]
})
		

begin_checkout


va('ecom','begin_checkout',{
  "customer": {
    "id": "internalID",
    "name": "John Smith",
    "email": "john@smith.com",
    "phoneNumber": "+4012312312312" 
  },
  "currency":"RON",
  "value":0.00,
  "coupon": "DISCOUNT CODE",
  "items":[
    {
      "id": "SKU_123",
      "item_name": "iPhone 15",
      "affiliation": "Magazin online #1",
      "coupon": "50%OFF",
      "discount": 10,
      "index": 0,
      "item_brand": "Apple",
      "item_category": "Category 1",
      "item_category2": "Category 2",
      "item_category3": "Category 3",
      "item_category4": "Category 4",
      "item_category5": "Category 5",
      "item_list_id": "LIST-123",
      "item_list_name": "John's wishlist",
      "item_variant": "Sky Blue",
      "location_id": "Online shop #2",
      "price": 6512.30,
      "quantity": 1,
      "image_url": "https://www.apple.com/newsroom/images/2023/09/apple-unveils-iphone-15-pro-and-iphone-15-pro-max/tile/Apple-iPhone-15-Pro-lineup-hero-230912.jpg.og.jpg?202309270316"
    }
  ]
})
		

generate_lead


va('ecom','generate_lead',{
  "customer": {
    "id": "internalID",
    "name": "John Smith",
    "email": "john@smith.com",
    "phoneNumber": "+4012312312312" 
  },
  "currency":"RON",
  "value":0.00
})
		

login


va('ecom','login',{
  "customer": {
    "id": "internalID",
    "name": "John Smith",
    "email": "john@smith.com",
    "phoneNumber": "+4012312312312" 
  },
  "method": "Basic auth"
})
		

purchase


va('ecom','purchase',{
  "customer": {
    "id": "internalID",
    "name": "John Smith",
    "email": "john@smith.com",
    "phoneNumber": "+4012312312312" 
  },
  "transaction_id": "PayPal12312321312",
  "currency": "RON",
  "value": 6502.30,
  "coupon": "DISCOUNT_CODE",
  "shipping":12.50,
  "tax": 850.21,
  "items":[
    {
      "id": "SKU_123",
      "item_name": "iPhone 15",
      "affiliation": "Magazin online #1",
      "coupon": "50%OFF",
      "discount": 10,
      "index": 0,
      "item_brand": "Apple",
      "item_category": "Category 1",
      "item_category2": "Category 2",
      "item_category3": "Category 3",
      "item_category4": "Category 4",
      "item_category5": "Category 5",
      "item_list_id": "LIST-123",
      "item_list_name": "John's wishlist",
      "item_variant": "Sky Blue",
      "location_id": "Online shop #2",
      "price": 6512.30,
      "quantity": 1,
      "image_url": "https://www.apple.com/newsroom/images/2023/09/apple-unveils-iphone-15-pro-and-iphone-15-pro-max/tile/Apple-iPhone-15-Pro-lineup-hero-230912.jpg.og.jpg?202309270316"
    }
  ]
})
		

refund


va('ecom','refund',{
  "customer": {
    "id": "internalID",
    "name": "John Smith",
    "email": "john@smith.com",
    "phoneNumber": "+4012312312312" 
  },
  "transaction_id": "PayPal12312321312",
  "currency": "RON",
  "value": 6502.30,
  "coupon": "DISCOUNT_CODE",
  "shipping":12.50,
  "tax": 850.21,
  "items":[
    {
      "id": "SKU_123",
      "item_name": "iPhone 15",
      "affiliation": "Magazin online #1",
      "coupon": "50%OFF",
      "discount": 10,
      "index": 0,
      "item_brand": "Apple",
      "item_category": "Category 1",
      "item_category2": "Category 2",
      "item_category3": "Category 3",
      "item_category4": "Category 4",
      "item_category5": "Category 5",
      "item_list_id": "LIST-123",
      "item_list_name": "John's wishlist",
      "item_variant": "Sky Blue",
      "location_id": "Online shop #2",
      "price": 6512.30,
      "quantity": 1,
      "image_url": "https://www.apple.com/newsroom/images/2023/09/apple-unveils-iphone-15-pro-and-iphone-15-pro-max/tile/Apple-iPhone-15-Pro-lineup-hero-230912.jpg.og.jpg?202309270316"
    }
  ]
})
		

remove_from_cart


va('ecom','remove_from_cart',{
  "customer": {
    "id": "internalID",
    "name": "John Smith",
    "email": "john@smith.com",
    "phoneNumber": "+4012312312312" 
  },
  "currency":"RON",
  "value":0.00,
  "items":[
    {
      "id": "SKU_123",
      "item_name": "iPhone 15",
      "affiliation": "Magazin online #1",
      "coupon": "50%OFF",
      "discount": 10,
      "index": 0,
      "item_brand": "Apple",
      "item_category": "Category 1",
      "item_category2": "Category 2",
      "item_category3": "Category 3",
      "item_category4": "Category 4",
      "item_category5": "Category 5",
      "item_list_id": "LIST-123",
      "item_list_name": "John's wishlist",
      "item_variant": "Sky Blue",
      "location_id": "Online shop #2",
      "price": 6512.30,
      "quantity": 1,
      "image_url": "https://www.apple.com/newsroom/images/2023/09/apple-unveils-iphone-15-pro-and-iphone-15-pro-max/tile/Apple-iPhone-15-Pro-lineup-hero-230912.jpg.og.jpg?202309270316"
    }
  ]
})
		

share


va('ecom','share',{
  "customer": {
    "id": "internalID",
    "name": "John Smith",
    "email": "john@smith.com",
    "phoneNumber": "+4012312312312" 
  },
  "method": "Twitter",
  "items":[
    {
      "id": "SKU_123",
      "item_name": "iPhone 15",
      "affiliation": "Magazin online #1",
      "coupon": "50%OFF",
      "discount": 10,
      "index": 0,
      "item_brand": "Apple",
      "item_category": "Category 1",
      "item_category2": "Category 2",
      "item_category3": "Category 3",
      "item_category4": "Category 4",
      "item_category5": "Category 5",
      "item_list_id": "LIST-123",
      "item_list_name": "John's wishlist",
      "item_variant": "Sky Blue",
      "location_id": "Online shop #2",
      "price": 6512.30,
      "quantity": 1,
      "image_url": "https://www.apple.com/newsroom/images/2023/09/apple-unveils-iphone-15-pro-and-iphone-15-pro-max/tile/Apple-iPhone-15-Pro-lineup-hero-230912.jpg.og.jpg?202309270316"
    }
  ]
})
		

sign_up


va('ecom','sign_up',{
  "customer": {
    "id": "internalID",
    "name": "John Smith",
    "email": "john@smith.com",
    "phoneNumber": "+4012312312312" 
  },
  "method": "Google"
})
		

view_cart


va('ecom','view_cart',{
  "customer": {
    "id": "internalID",
    "name": "John Smith",
    "email": "john@smith.com",
    "phoneNumber": "+4012312312312" 
  },
  "currency":"RON",
  "value":0.00,
  "items":[
    {
      "id": "SKU_123",
      "item_name": "iPhone 15",
      "affiliation": "Magazin online #1",
      "coupon": "50%OFF",
      "discount": 10,
      "index": 0,
      "item_brand": "Apple",
      "item_category": "Category 1",
      "item_category2": "Category 2",
      "item_category3": "Category 3",
      "item_category4": "Category 4",
      "item_category5": "Category 5",
      "item_list_id": "LIST-123",
      "item_list_name": "John's wishlist",
      "item_variant": "Sky Blue",
      "location_id": "Online shop #2",
      "price": 6512.30,
      "quantity": 1,
      "image_url": "https://www.apple.com/newsroom/images/2023/09/apple-unveils-iphone-15-pro-and-iphone-15-pro-max/tile/Apple-iPhone-15-Pro-lineup-hero-230912.jpg.og.jpg?202309270316"
    }
  ]
})
		

view_item


va('ecom','view_item',{
  "customer": {
    "id": "internalID",
    "name": "John Smith",
    "email": "john@smith.com",
    "phoneNumber": "+4012312312312" 
  },
  "currency":"RON",
  "value":0.00,
  "items":[
    {
      "id": "SKU_123",
      "item_name": "iPhone 15",
      "affiliation": "Magazin online #1",
      "coupon": "50%OFF",
      "discount": 10,
      "index": 0,
      "item_brand": "Apple",
      "item_category": "Category 1",
      "item_category2": "Category 2",
      "item_category3": "Category 3",
      "item_category4": "Category 4",
      "item_category5": "Category 5",
      "item_list_id": "LIST-123",
      "item_list_name": "John's wishlist",
      "item_variant": "Sky Blue",
      "location_id": "Online shop #2",
      "price": 6512.30,
      "quantity": 1,
      "image_url": "https://www.apple.com/newsroom/images/2023/09/apple-unveils-iphone-15-pro-and-iphone-15-pro-max/tile/Apple-iPhone-15-Pro-lineup-hero-230912.jpg.og.jpg?202309270316"
    }
  ]
})
		

view_item_list


va('ecom','view_item_list',{
  "customer": {
    "id": "internalID",
    "name": "John Smith",
    "email": "john@smith.com",
    "phoneNumber": "+4012312312312" 
  },
  "term": "Item List Name",
  "currency":"RON",
  "value":0.00,
  "items":[
    {
      "id": "SKU_123",
      "item_name": "iPhone 15",
      "affiliation": "Magazin online #1",
      "coupon": "50%OFF",
      "discount": 10,
      "index": 0,
      "item_brand": "Apple",
      "item_category": "Category 1",
      "item_category2": "Category 2",
      "item_category3": "Category 3",
      "item_category4": "Category 4",
      "item_category5": "Category 5",
      "item_list_id": "LIST-123",
      "item_list_name": "John's wishlist",
      "item_variant": "Sky Blue",
      "location_id": "Online shop #2",
      "price": 6512.30,
      "quantity": 1,
      "image_url": "https://www.apple.com/newsroom/images/2023/09/apple-unveils-iphone-15-pro-and-iphone-15-pro-max/tile/Apple-iPhone-15-Pro-lineup-hero-230912.jpg.og.jpg?202309270316"
    }
  ]
})