Events
For analytics, the core engine fires events for page views, clicks, etc. Extensions or themes can use FPI to listen to the events & process them according to their needs. Below is an example of how you can use FPI events:
FPI.event.on('product_list.view', function(eventData) {
// implement logic to send data to any analytics platform
})
Supported Events
- Product Listing View
- Collection Listing View
- Product View
- Add to Cart
- Remove from Cart
- Update Cart
- Add to Compare
- Remove from Compare
- Add to Wishlist
- Remove from Wishlist
- Cart View
- Checkout
- Order Processed
- Search Products
- Pincode Serviceability
- Select Address
All events have a shared payload which is present in all events
Key | Data Type | Information | Example |
---|---|---|---|
event_action | String | event key | product_list.view |
screen | String | screen orientation | landscape |
screen_view | String | page on which event was fired | home |
user | Object | User Info | |
user.first_name | String | First name of user | |
user.last_name | String | Last name of user | |
user.gender | String | Gender of user | |
user.uid | String | Unique ID | |
user._id | String | Mongo Object ID | |
user.created_at | String | ||
user.updated_at | String | ||
user.profile_pic_url | String | Profile picture url | |
user.emails | Array | List of user emails | |
user.phone_numbers | Array | List of user phone numbers |
Product Listing View
This event is fired when the product listing page is viewed
Event key: product_list.view
Payload
Key | Data Type | Information | Example |
---|---|---|---|
route | String | Route of the page | /products?q=shirts |
url | String | Page URL | https://www.fynd.com/products/?q=shirts |
page | Object | Pagination Object | home |
page.has_next | Boolean | ||
page.has_previous | Boolean | ||
page.item_total | Number | Total items | |
page.next_id | String | Next page id | |
page.type | String | Pagination type |
Collection Listing View
This event is fired when the product listing page is viewed
Event key: collection_list.view
Payload
Key | Data Type | Information | Example |
---|---|---|---|
name | String | Collection Name | Best Sellers |
slug | String | Collection Slug | best-sellers |
Product View
This event is fired when the product page is viewed
Event key: product.view
Payload
Key | Data Type | Information | Example |
---|---|---|---|
product | Object | Product information | |
product.brand | Object | Product brand information | |
product.brand.name | String | Brand of product | Bieng Human |
product.brand.uid | Number | Unique id of brand | 1 |
product.category | Object | product Category information | |
product.category.name | String | Category name of product | Activewear T-shirts |
product.category.uid | Number | Unique id of category | 1 |
product.item_code | String | Item code of product | BH-K01 |
product.name | String | Name of product | Green Activewear Tshirts |
product.price | Object | Product price information | |
product.price.currency_code | String | Price currency code of product | INR |
product.price.currency_symbol | String | Price currency symbol of product | ₹ |
product.price.max | Number | Max price of product | 500 |
product.price.min | Number | Min price of product | 500 |
product.sizes | Array | Product all sizes information | |
product.sizes[0].value | String | Size of product | OS |
product.sizes[0].is_available | Boolean | Is product size available | TRUE |
product.uid | Number | Unique id of product | 7501234 |
Add to Cart
This event is fired when the add product to cart
Event key: cart.newProduct
Payload
Key | Data Type | Information | Example |
---|---|---|---|
cart_id | Number | Cart id of product | 61b1a777ce6bb59d8fbfc62d |
products | Array | Product Information |
Remove from Cart
This event is fired when the remove cart product
Event key: cart.remove
Payload
Key | Data Type | Information | Example |
---|---|---|---|
cart_id | Number | Cart id of product | 61b1a777ce6bb59d8fbfc62d |
products | Array | Product Information |
Update Cart
This event is fired when the update cart product
Event key: cart.update
Payload
Key | Data Type | Information | Example |
---|---|---|---|
cart_id | Number | Cart id of product | 61b1a777ce6bb59d8fbfc62d |
products | Array | Product Information |
Product Payload
Key | Data Type | Information | Example |
---|---|---|---|
products[0].article | Object | Article of added product | |
products[0].article.uid | String | Unique id of article | 619e1106f55b671ef4c57bcb |
products[0].brand | Object | Product brand information | |
products[0].brand.name | String | Brand name of product | Bieng Human |
products[0].brand.uid | Number | Unique id of brand | 1 |
products[0].category | Object | product.category information | |
products[0].category.name | String | Category name of product | Activewear T-shirts |
products[0].category.uid | Number | Unique id of category | 1 |
products[0].item_code | String | Item code of added product | BH-K01 |
products[0].name | String | Name of product | Green Activewear Tshirts |
products[0].out_of_stock | Boolean | FALSE | |
products[0].price | Object | Price information of product | |
products[0].price.add_on | Number | Add on price of product | 1000 |
products[0].price.currency_code | String | Price currency code of product | INR |
products[0].price.currency_symbol | String | Price currency symbol of product | ₹ |
products[0].price.effective | Number | Effective price of product | 1000 |
products[0].price.marked | Number | Marked price of product | 1000 |
products[0].price.selling | Number | Selling price of product | 1000 |
products[0].quantity | Object | Quanty information of added product | |
products[0].quantity.current | Number | Quantity of product | 1 |
product[0].seller | Object | Seller information of product | |
products[0].seller.uid | Number | Unique id of seller | 1 |
products[0].size | String | Size of product | |
products[0].store | Object | Store information of added product | |
products[0].store.uid | Number | Unique id of store | 1 |
product[0].uid | Number | Unique id of product | 7501234 |
product[0].valid | Boolean | Is valid product | TRUE |
Add to Compare
This event is fired when the product is added to compare
Event key: compare.add
Payload
Key | Data Type | Information | Example |
---|---|---|---|
slug | String | Name of product | black-shoes |
Remove from Compare
This event is fired when the product is removed from compare
Event key: compare.remove
Payload
Key | Data Type | Information | Example |
---|---|---|---|
slug | String | Name of product | black-shoes |
Add to Wishlist
This event is fired when the product is added to wishlist
Event key: wishlist.add
Payload
Key | Data Type | Information | Example |
---|---|---|---|
slug | String | Name of product | black-shoes |
Remove from Wishlist
This event is fired when the product is removed from wishlist
Event key: wishlist.remove
Key | Data Type | Information | Example |
---|---|---|---|
slug | String | Name of product | black-shoes |
Cart View
This event is fired when the cart is viewed
Event key: cart.view
Key | Data Type | Information | Example |
---|---|---|---|
breakup_values_raw | Object | ||
cart_id | Number | Cart id of product | 2321 |
products | Array | Product Information |
Breakup Value Payload
Key | Data Type | Information | Example |
---|---|---|---|
breakup_values_raw | Object | ||
breakup_values_raw.cod_charge | Number | Cod charge of the product | 0 |
breakup_values_raw.convenience_fee | Number | Convenience fee of the product | 0 |
breakup_values_raw.coupon | Number | Coupon value of product | 0 |
breakup_values_raw.delivery_charge | Number | Delivery charge of product | 0 |
breakup_values_raw.discount | Number | Discount on product | -420 |
breakup_values_raw.fynd_cash | Number | Fynd cash on product | -200 |
breakup_values_raw.gst_charges | Number | Gst charges of product | 0 |
breakup_values_raw.mrp_total | Number | Total mrp of product | 10920 |
breakup_values_raw.sub_total | Number | Sub total amount of product | 10500 |
breakup_values_raw.total | Number | Total amount of product | 10300 |
breakup_values_raw.vog | Number | Value of goods | 10500 |
breakup_values_raw.you_saved | Number | Saved amount on product | 0 |
Checkout
This event is fired when the order is checkout
Event key: order.checkout
Payload
Key | Data Type | Information | Example |
---|---|---|---|
breakup_values_raw | Object | ||
cart_id | Number | Cart id of product | 2321 |
checkout_mode | String | checkout mode | self |
products | Array | Product Information |
Order Processed
This event is fired when the order is processed
Event key: order.processed
Payload
Key | Data Type | Information | Example |
---|---|---|---|
breakup_values_raw | Object | ||
items | Array | ||
items[0].brand | Object | Brand information of item | |
items[0].brand.logo | String | Logo of brand | https://hdn-1.addsale.com/x0/brands/pictures/square-logo/original/VIiKH16Qj-Logo.jpeg |
items[0].brand.name | String | Brand name | Jazz |
items[0].code | String | Code of item | BJ-09 |
items[0].id | Number | Id of item | 7501215 |
items[0].image | Array | Item image information | |
items[0].image[0] | String | Image of item | https://hdn-1.fynd.com/media/fynd_store_items/l2_category/720x0/2830_c5bb5fc02f414307a828c4c56483c30a.jpg |
items[0].name | String | Name of item | Apache Air |
items[0].size | String | Size of item | OS |
items[0].slug_key | String | Slug key of item | apache-air |
order_id | String | Order id of item | FY61A8BDEE0124D82B5D |
shipments | Array | Shipment information | |
shipments[0].payment_mode | String | Shipment payment mode | NB_ICICI |
shipments[0].shipment_id | String | Shipment id of item | 16384486232721265312 |
shipments[0].status | String | Status of shipment | Placed |
Status | String | Status of Order |
Search Products
This event is fired when product is searched
Event key: search.product
Payload
Key | Data Type | Information | Example |
---|---|---|---|
search_text | String | text searched | Puma |
Pincode Serviceability
This event is fired when we check pincode serviceability
Event key: pincode.serviceablility
Payload
Key | Data Type | Information | Example |
---|---|---|---|
pincode | String | pincode to check | 400051 |
serviceable | Boolean | Is pincode serviceable | TRUE |
Select Address
This event is fired when the address is selected for checkout
Event key: order.address_information
Payload
Key | Data Type | Information | Example |
---|---|---|---|
coupon | Object | coupon information of the product | "coupon": coupon_code: "", |
pincode | String | address pincode | "400018" |
cart | Object | cart_id of the product | “665054389061e924768c696e” |