Chord Commerce Event Tracking
Getting Started
API Reference
40min
trackcartviewed the trackcartviewed method sends a "cart viewed" event to the cdp chord trackcartviewed({ cart }) promise\<void> the library will call the cart formatter with the cart argument and use the returned object to construct and send the "cart viewed" event property type required description cart any yes an object representing the current cart trackcheckoutstarted the trackcheckoutstarted method sends a "checkout started" event to the cdp chord trackcheckoutstarted({ checkout }) promise\<void> the library will call the checkout formatter with the checkout argument and use the returned object to construct and send the "checkout started" event property type required description checkout any yes an object representing the current checkout trackcheckoutstepcompleted the trackcheckoutstepcompleted method sends a "checkout step completed" event to the cdp chord trackcheckoutstepcompleted({ checkoutid, step, paymentmethod, shippingmethod, }) property type required description checkoutid string yes the id of the checkout step number yes the checkout step number paymentmethod string no the payment method used shippingmethod string no the shipping method selected trackcheckoutstepviewed the trackcheckoutstepviewed method sends a "checkout step viewed" event to the cdp chord trackcheckoutstepviewed({ checkoutid, step, paymentmethod, shippingmethod, }) property type required description checkoutid string yes the id of the checkout step number yes the checkout step number paymentmethod string no the payment method used shippingmethod string no the shipping method selected trackcouponapplied the trackcouponapplied method sends a "coupon applied" event to the cdp this event should be sent immediately after the coupon has been successfully applied to the cart chord trackcouponapplied({ cartid, couponid, couponname, discount, orderid, }) property type required description cartid string no cart id, if applicable couponid string no coupon id couponname string no coupon name discount number no monetary discount applied through the coupon orderid string no order or transaction id, if applicable trackcoupondenied the trackcoupondenied method sends a "coupon denied" event to the cdp this event should be sent when a coupon could not be applied to the cart chord trackcoupondenied({ cartid, couponid, couponname, orderid, reason, }) property type required description cartid string no cart id, if applicable couponid string no coupon id couponname string no coupon name orderid string no order or transaction id, if applicable reason string no reason the coupon was denied trackcouponentered the trackcouponentered method sends a "coupon entered" event to the cdp this event should be sent immediately after the coupon was entered, usually upon the customer clicking a button to submit, but before the coupon was applied or denied chord trackcouponentered({ cartid, couponid, couponname, discount, orderid, }) property type required description cartid string no cart id, if applicable couponid string no coupon id couponname string no coupon name orderid string no order or transaction id, if applicable trackcouponremoved the trackcouponremoved method sends a "coupon removed" event to the cdp this event should be sent immediately after the coupon was removed from the cart chord trackcouponremoved({ cartid, couponid, couponname, discount, orderid, }) property type required description cartid string no cart id, if applicable couponid string no coupon id couponname string no coupon name orderid string no order or transaction id, if applicable trackemailcaptured the trackemailcaptured method sends an "email captured" event to the cdp this event should be sent anywhere a customer enters an email address, like a newsletter sign up or a product wait list chord trackemailcaptured({ email, placementcomponent, placementpage }) property type required description email string no the email address that was captured placementcomponent string no an identifier for the ui component where the email was captured for example, footer newsletter placementpage string no an identifier for the page where the email was captured for example, homepage trackloginstarted the trackloginstarted method sends a "login started" event to the cdp chord trackloginstarted({ email, }) property type required description email string no the email used for login tracknavigationclicked the tracknavigationclicked method sends a "navigation clicked" event to the cdp chord tracknavigationclicked({ category, label, navigationplacement, navigationtitle, navigationurl, }) property type required description category string no the category of the navigation item label string no the label of the navigation item navigationplacement string no the placement of the navigation (e g header, footer) navigationtitle string no the title of the navigation navigationurl string no the url of the navigation item trackpaymentinfoentered the trackpaymentinfoentered method sends a "payment info entered" event to the cdp chord trackpaymentinfoentered({ checkoutid, coupon, currency, orderid, paymentmethod, products, shippingmethod, step, value, }) property type required description checkoutid string no the id of the checkout coupon string no the coupon code applied to the order currency string no the currency of the order orderid string no the id of the order paymentmethod string no the payment method used products array of products no the products in the order shippingmethod string no the shipping method selected step number yes the checkout step number value number no the total value of the order trackproductadded the trackproductadded method sends a "product added" event to the cdp this event should be sent when a product is added to the cart it should only be sent when the product is initally added, not when the quantity is incremented for an existing cart item chord trackproductadded({ cart, product { position, product, quantity, variantid } }) property type required description cart any yes the current cart product position number no the position in a list of the product that was added, if relevant product product any yes product and variant details, like product name and variant skus quantity number no the quantity of the product added to the cart variantid any no the unique identifier of the product variant trackproductclicked the trackproductclicked method sends a "product clicked" event to the cdp this event should be sent when a product link is clicked on the site chord trackproductclicked({ cart, listid, listname, product { position, product, quantity, variantid } }) property type required description cart any yes the current cart listid any no an identifier for the list where the product was clicked listname string no a name for the list where the product was clicked product position number no the position in a list of the product that was clicked, if relevant product product any yes product and variant details, like product name and variant skus quantity number no the quantity of the product clicked, if relevant variantid any no the unique identifier of the product variant trackproductlistfiltered the trackproductlistfiltered method sends a "product list filtered" event to the cdp this event should be sent when a filter is applied to a list of products property type required description category string no product category being viewed listid string no the id of the list in which the item was presented to the user listname string no the name of the list in which the item was presented to the user filters array of { type?\ string, value? string} no product filters selected by the customer sorts array of { type?\ string, value? string} no product sorts selected by the customer chord trackproductlistfiltered({ category, listid, listname, filters, sorts }) trackproductlistviewed the trackproductlistviewed method sends a "product list viewed" event to the cdp this event should be sent when a list of products is viewed chord trackproductlistviewed({ category, listid, listname, products }) property type required description category string no product category being viewed listid string no the id of the list in which the item was presented to the user listname string no the name of the list in which the item was presented to the user products array of products yes products being viewed trackproductremoved the trackproductremoved method sends a "product removed" event to the cdp this event should be sent when a product is removed from the cart chord trackproductremoved({ cart, lineitem }) property type required description cart any yes an object representing the cart after the line item was removed lineitem any yes an object representing the line item that was removed trackproductviewed the trackproductviewed method sends a "product viewed" event to the cdp this event should be sent whenever a product page is viewed chord trackproductviewed({ cart, product { position, product, quantity, variantid } }) property type required description cart any yes the current cart product position number no the position in a list of the product that was added, if relevant product product any yes product and variant details, like product name and variant skus quantity number no the quantity of the product added to the cart variantid any no the unique identifier of the product variant trackproductssearched the trackproductssearched method sends a "products searched" event to the cdp this event should be sent whenever a search is submitted chord trackproductssearched({ currency, price, productid, quantity, query, }) property type required description currency string no currency of the transaction (must be a valid iso 4217 three digit currency code) price number no price ($) of the product searched for productid any no database id of the product searched for quantity number no quantity of the product searched for query string no query the user searched with tracksignedin the tracksignedin method sends a "signed in" event to the cdp this event should be sent when the customer signs in successfully chord tracksignedin({ email, method }) property type required description email string no the user's email method string no the method used tracksignedout the tracksignedout method sends a "signed out" event to the cdp this event should be sent when the customer signs out successfully chord tracksignedout({ email }) property type required description email string no the user's email tracksignedup the tracksignedup method sends a "signed up" event to the cdp this event should be sent when the customer signs up successfully chord tracksignedup({ email, method }) property type required description email string no the user's email method string no the method used tracksubscriptioncancelled the tracksubscriptioncancelled method sends a "subscription cancelled" event to the cdp chord tracksubscriptioncancelled({ actionabledate, address, brand, email, enddate, intervallength, intervalunits, products, state, subscriptionid, currency, }) property type required description actionabledate string no the date when the subscription can be actioned address address no the address associated with the subscription brand string no the brand associated with the subscription email string no the email associated with the subscription enddate string no the end date of the subscription intervallength number no the length of the subscription interval intervalunits string no the units of the subscription interval (e g month, year) products array of products no the products in the subscription state string no the state of the subscription (e g active, cancelled) subscriptionid string no the id of the subscription currency string no the currency of the subscription trackvariantclicked the trackvariantclicked method sends a "variant clicked" event to the cdp chord trackvariantclicked({ product, cart, lineitemid, coupon, }) property type required description product any yes the product variant that was clicked cart any yes the cart associated with the event lineitemid string no the id of the line item coupon string no the coupon code applied to the cart identify the identify method sends an identify event to the cdp chord identify(userid, { traits }) // or chord identify({ traits }) we recommend sending an identify event whenever the following happens after a user creates an account after a user logs into their account when a user submits any identifying information, like an email address or a phone number when a user adds or updates profile information it’s not typically necessary to send an identify event on page load if you’re sending a track event at the same time as an identify event, we recommend sending identify first and the track event second some integrations require an identify event before they can process track events reset the reset method sends a reset event to the cdp tracking library this does not result in an event appearing in the cdp it resets the user’s session in the browser, which means the user will receive a new anonymous identifier and any previous user data will be cleared we recommend calling the reset method after a user has successfully logged out of their account track the track method sends a track event to the cdp chord track('navigation clicked', { 	label 'home', 	location 'main nav', 	url '/'	 }) track can be used to send any event to the cdp, including events in the chord tracking plan however, we recommend using an event specific method like trackproductviewed instead if one is available, so that chord's library can construct the event body to match the tracking plan see the individual event tracking methods above track does not use event or object formatters and simply sends the second argument directly to the cdp as the event body track does not transform property names from camel case to snake case; event properties will be sent to the cdp exactly as written we recommend using snake case for all event properties null values will be stripped by default unless stripnull is set to false in the chordanalytics options