Tracking events

The SDK's own tracking contract: what happened on the page, at the moments that count for tracking, named in the storefront style (product_added_to_cart, checkout_completed). Each carries the same object the SDK's events carry (the Cart, a CartItem, the Checkout, the Order), in one envelope: { event_id, event_type, object, data, created_at, session_id, sdk_version, context }. Each destination remaps them to its own format. next.analytics.on(name, (event) => …) receives one, '*' every one. How analytics works says how each is sent; each event's page has what triggers it, its data, and what each destination gets.

Pages

EventWhen
page_viewedEvery page load, when the SDK is ready.
product_viewedOn ready, when the page shows exactly one package, at its catalog price.
product_list_viewedOn ready, when the page shows more than one package, at their catalog prices.

Carts

EventWhen
product_added_to_cartOne per line the cart gained since the last report, after its price; on ready for a cart filled before the page.
product_removed_from_cartOne per line the cart lost since the last report, at the price it was reported with.
cart_updatedAfter every price update.

Checkout

EventWhen
checkout_startedOnce per checkout, when its form is ready.
checkout_contact_info_submittedOnce, when the contact details saved an Open Cart.
checkout_shipping_address_submittedOnce per checkout, when the shipping address is valid.
checkout_shipping_method_submittedOnce per checkout, when a shipping method is picked and the cart is priced with it.
checkout_payment_info_submittedOnce per checkout, when a submit passes its checks.

Orders

EventWhen
checkout_completedOnce per order, when it is paid; on a later page when the paying page was left before it was sent.

Upsells

EventWhen
upsell_completedOnce per accepted upsell, when the order is loaded with it.
upsell_viewedOnce per upsell page, when an offer is shown.
upsell_skippedEvery time an upsell is skipped.

Promotions

EventWhen
promotion_viewedEvery time a promotion is shown.
promotion_selectedEvery time a promotion is clicked.