Skip to main content

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

All events have a shared payload which is present in all events

KeyData TypeInformationExample
event_actionStringevent keyproduct_list.view
screenStringscreen orientationlandscape
screen_viewStringpage on which event was firedhome
userObjectUser Info
user.first_nameStringFirst name of user
user.last_nameStringLast name of user
user.genderStringGender of user
user.uidStringUnique ID
user._idStringMongo Object ID
user.created_atString
user.updated_atString
user.profile_pic_urlStringProfile picture url
user.emailsArrayList of user emails
user.phone_numbersArrayList of user phone numbers

Product Listing View

This event is fired when the product listing page is viewed Event key: product_list.view

Payload

KeyData TypeInformationExample
routeStringRoute of the page/products?q=shirts
urlStringPage URLhttps://www.fynd.com/products/?q=shirts
pageObjectPagination Objecthome
page.has_nextBoolean
page.has_previousBoolean
page.item_totalNumberTotal items
page.next_idStringNext page id
page.typeStringPagination type

Collection Listing View

This event is fired when the product listing page is viewed Event key: collection_list.view

Payload

KeyData TypeInformationExample
nameStringCollection NameBest Sellers
slugStringCollection Slugbest-sellers

Product View

This event is fired when the product page is viewed Event key: product.view

Payload

KeyData TypeInformationExample
productObjectProduct information
product.brandObjectProduct brand information
product.brand.nameStringBrand of productBieng Human
product.brand.uidNumberUnique id of brand1
product.categoryObjectproduct Category information
product.category.nameStringCategory name of productActivewear T-shirts
product.category.uidNumberUnique id of category1
product.item_codeStringItem code of productBH-K01
product.nameStringName of productGreen Activewear Tshirts
product.priceObjectProduct price information
product.price.currency_codeStringPrice currency code of productINR
product.price.currency_symbolStringPrice currency symbol of product
product.price.maxNumberMax price of product500
product.price.minNumberMin price of product500
product.sizesArrayProduct all sizes information
product.sizes[0].valueStringSize of productOS
product.sizes[0].is_availableBooleanIs product size availableTRUE
product.uidNumberUnique id of product7501234

Add to Cart

This event is fired when the add product to cart Event key: cart.newProduct

Payload

KeyData TypeInformationExample
cart_idNumberCart id of product61b1a777ce6bb59d8fbfc62d
productsArrayProduct Information

Remove from Cart

This event is fired when the remove cart product Event key: cart.remove

Payload

KeyData TypeInformationExample
cart_idNumberCart id of product61b1a777ce6bb59d8fbfc62d
productsArrayProduct Information

Update Cart

This event is fired when the update cart product Event key: cart.update

Payload

KeyData TypeInformationExample
cart_idNumberCart id of product61b1a777ce6bb59d8fbfc62d
productsArrayProduct Information

Product Payload

KeyData TypeInformationExample
products[0].articleObjectArticle of added product
products[0].article.uidStringUnique id of article619e1106f55b671ef4c57bcb
products[0].brandObjectProduct brand information
products[0].brand.nameStringBrand name of productBieng Human
products[0].brand.uidNumberUnique id of brand1
products[0].categoryObjectproduct.category information
products[0].category.nameStringCategory name of productActivewear T-shirts
products[0].category.uidNumberUnique id of category1
products[0].item_codeStringItem code of added productBH-K01
products[0].nameStringName of productGreen Activewear Tshirts
products[0].out_of_stockBooleanFALSE
products[0].priceObjectPrice information of product
products[0].price.add_onNumberAdd on price of product1000
products[0].price.currency_codeStringPrice currency code of productINR
products[0].price.currency_symbolStringPrice currency symbol of product
products[0].price.effectiveNumberEffective price of product1000
products[0].price.markedNumberMarked price of product1000
products[0].price.sellingNumberSelling price of product1000
products[0].quantityObjectQuanty information of added product
products[0].quantity.currentNumberQuantity of product1
product[0].sellerObjectSeller information of product
products[0].seller.uidNumberUnique id of seller1
products[0].sizeStringSize of product
products[0].storeObjectStore information of added product
products[0].store.uidNumberUnique id of store1
product[0].uidNumberUnique id of product7501234
product[0].validBooleanIs valid productTRUE

Add to Compare

This event is fired when the product is added to compare Event key: compare.add

Payload

KeyData TypeInformationExample
slugStringName of productblack-shoes

Remove from Compare

This event is fired when the product is removed from compare Event key: compare.remove

Payload

KeyData TypeInformationExample
slugStringName of productblack-shoes

Add to Wishlist

This event is fired when the product is added to wishlist Event key: wishlist.add

Payload

KeyData TypeInformationExample
slugStringName of productblack-shoes

Remove from Wishlist

This event is fired when the product is removed from wishlist Event key: wishlist.remove

KeyData TypeInformationExample
slugStringName of productblack-shoes

Cart View

This event is fired when the cart is viewed Event key: cart.view

KeyData TypeInformationExample
breakup_values_rawObject
cart_idNumberCart id of product2321
productsArrayProduct Information

Breakup Value Payload

KeyData TypeInformationExample
breakup_values_rawObject
breakup_values_raw.cod_chargeNumberCod charge of the product0
breakup_values_raw.convenience_feeNumberConvenience fee of the product0
breakup_values_raw.couponNumberCoupon value of product0
breakup_values_raw.delivery_chargeNumberDelivery charge of product0
breakup_values_raw.discountNumberDiscount on product-420
breakup_values_raw.fynd_cashNumberFynd cash on product-200
breakup_values_raw.gst_chargesNumberGst charges of product0
breakup_values_raw.mrp_totalNumberTotal mrp of product10920
breakup_values_raw.sub_totalNumberSub total amount of product10500
breakup_values_raw.totalNumberTotal amount of product10300
breakup_values_raw.vogNumberValue of goods10500
breakup_values_raw.you_savedNumberSaved amount on product0

Checkout

This event is fired when the order is checkout Event key: order.checkout

Payload

KeyData TypeInformationExample
breakup_values_rawObject
cart_idNumberCart id of product2321
checkout_modeStringcheckout modeself
productsArrayProduct Information

Order Processed

This event is fired when the order is processed Event key: order.processed

Payload

KeyData TypeInformationExample
breakup_values_rawObject
itemsArray
items[0].brandObjectBrand information of item
items[0].brand.logoStringLogo of brandhttps://hdn-1.addsale.com/x0/brands/pictures/square-logo/original/VIiKH16Qj-Logo.jpeg
items[0].brand.nameStringBrand nameJazz
items[0].codeStringCode of itemBJ-09
items[0].idNumberId of item7501215
items[0].imageArrayItem image information
items[0].image[0]StringImage of itemhttps://hdn-1.fynd.com/media/fynd_store_items/l2_category/720x0/2830_c5bb5fc02f414307a828c4c56483c30a.jpg
items[0].nameStringName of itemApache Air
items[0].sizeStringSize of itemOS
items[0].slug_keyStringSlug key of itemapache-air
order_idStringOrder id of itemFY61A8BDEE0124D82B5D
shipmentsArrayShipment information
shipments[0].payment_modeStringShipment payment modeNB_ICICI
shipments[0].shipment_idStringShipment id of item16384486232721265312
shipments[0].statusStringStatus of shipmentPlaced
StatusStringStatus of Order

Search Products

This event is fired when product is searched Event key: search.product

Payload

KeyData TypeInformationExample
search_textStringtext searchedPuma

Pincode Serviceability

This event is fired when we check pincode serviceability Event key: pincode.serviceablility

Payload

KeyData TypeInformationExample
pincodeStringpincode to check400051
serviceableBooleanIs pincode serviceableTRUE

Select Address

This event is fired when the address is selected for checkout Event key: order.address_information

Payload

KeyData TypeInformationExample
couponObjectcoupon information of the product"coupon": coupon_code: "",
pincodeStringaddress pincode"400018"
cartObjectcart_id of the product“665054389061e924768c696e”