Chord Event Tracking
Getting started
SDK API reference
41 min
complete reference for all tracking methods available in the @chordcommerce/analytics library page views chord page() sends a page view event to chord chord page() user identity chord identify(userid, traits) sends an identify event to associate a user with their traits call this after account creation, login, or when a user submits identifying information chord identify(userid, { email, phone, firstname, lastname }) // or without userid chord identify({ email, phone }) true 165,165,165,166 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type best practice send identify before track events when both occur at the same time some downstream integrations require identity to be established before processing track events chord reset() resets the user session the user receives a new anonymous identifier and previous user data is cleared call this after logout chord reset() product events chord trackproductviewed({ cart, product }) sends a "product viewed" event call this whenever a product page is viewed true 165,165,165,166 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type chord trackproductadded({ cart, product }) sends a "product added" event when a product is first added to cart (not for quantity changes) same parameters as trackproductviewed chord trackproductremoved({ cart, lineitem }) sends a "product removed" event when a product is removed from cart true 165,165,165,166 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type chord trackproductclicked({ cart, product, listid, listname }) sends a "product clicked" event when a product link is clicked true 165,165,165,166 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type chord trackproductlistviewed({ category, listid, listname, products }) sends a "product list viewed" event true 165,165,165,166 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type chord trackproductlistfiltered({ category, listid, listname, filters, sorts }) sends a "product list filtered" event when filters are applied true 165,165,165,166 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type chord trackproductssearched({ query }) sends a "products searched" event true 165,165,165,166 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type cart events chord trackcartviewed({ cart }) sends a "cart viewed" event true 165,165,165,166 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type checkout events chord trackcheckoutstarted({ checkout }) sends a "checkout started" event true 165,165,165,166 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type chord trackcheckoutstepviewed({ checkoutid, step }) sends a "checkout step viewed" event true 165,165,165,166 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type chord trackcheckoutstepcompleted({ checkoutid, step }) sends a "checkout step completed" event same parameters as trackcheckoutstepviewed chord trackpaymentinfoentered({ checkoutid, step }) sends a "payment info entered" event true 165,165,165,166 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type order events chord trackordercompleted({ orderid, orderdate, currency, revenue, total, products }) sends an "order completed" event true 165,165,165,166 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type coupon events chord trackcouponapplied({ cartid, couponid, couponname, discount, orderid }) sends a "coupon applied" event after successful application true 165,165,165,166 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type chord trackcoupondenied({ cartid, couponid, couponname, orderid, reason }) sends a "coupon denied" event same parameters as trackcouponapplied , plus reason ( string , optional) chord trackcouponentered({ cartid, couponid, couponname, discount, orderid }) sends a "coupon entered" event immediately after entry, before approval/denial same parameters as trackcouponapplied chord trackcouponremoved({ cartid, couponid, couponname, discount, orderid }) sends a "coupon removed" event same parameters as trackcouponapplied email & login events chord trackemailcaptured({ email, placementcomponent, placementpage }) sends an "email captured" event when a customer enters an email address true 165,165,165,166 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type chord trackloginstarted({ email }) sends a "login started" event true 165,165,165,166 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type authentication events chord tracksignedin({ email, method }) sends a "signed in" event after successful login true 165,165,165,166 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type chord tracksignedup({ email, method }) sends a "signed up" event after successful signup same parameters as tracksignedin chord tracksignedout({ email }) sends a "signed out" event after successful logout true 165,165,165,166 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type navigation events chord tracknavigationclicked({ category, label, navigationplacement, navigationtitle, navigationurl }) sends a "navigation clicked" event true 165,165,165,166 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type variant events chord trackvariantclicked({ product, cart, lineitemid, coupon }) sends a "variant clicked" event true 165,165,165,166 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type subscription events chord tracksubscriptioncancelled({ subscriptionid, }) sends a "subscription cancelled" event true 165,165,165,166 left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type generic track method chord track(eventname, properties) sends a custom event directly to chord this bypasses formatters and sends properties as is chord track('custom event name', { custom property 'value', another property 123, }) important this method does not use formatters or transform property names use snake case for all property names prefer event specific methods when available