Commerce & Catalog Item Events
How to set up activity tracking and commerce interactions via the SDK.
This guide explains how to send commerce and catalog-related user interactions to Pushly using the Web SDK. These events power features like abandoned cart notifications, saved item reminders, revenue attribution, and catalog-driven recommendation campaigns.
The Pushly Web SDK must be loaded and initialized before sending any of the events described below.
The following steps assume that you are providing an item catalog/feed to our team. Please contact your account manager for more information on this process.
Supported Interaction Types
Pushly supports the following commerce and catalog interactions:
view_item – A user views a product, event, or recipe detail page
save_item – A user saves or favorites an item
add_to_cart – A user adds an item to their cart
update_cart – A user modifies cart contents or quantities
purchase – A user completes a transaction
Each interaction can reference items using one of three identifier types, depending on your catalog configuration.
Item Identifier Types
Every interaction includes one of the following top‑level arrays:
products – Standard e‑commerce product catalog items
events – Event‑based catalog items (e.g., ticketed content)
recipes – Recipe or content‑based catalog items
Only one identifier type should be included per interaction call.
Each item requires an id. Quantity is optional unless otherwise noted.
All of the following code snippets must be ran after the SDK has been initialized.
View Item
Send this event when a user views an item detail page.
Save Item
Use this event when a user saves, favorites, or bookmarks an item. This enables saved‑item reminder campaigns.
Add To Cart
Send this event whenever a user adds an item to their cart. Pushly will accumulate cart state across multiple calls.
You may call add_to_cart as many times as necessary to keep track of all items in a visitor's cart. Abandoned Cart notifications may be sent for any item in a customer's cart that has not been purchased.
After a purchase is made the visitor's cart will be emptied and no notifications for a purchased item will be sent to the visitor.
Update Cart
Use this event when a user changes their cart without completing a purchase, such as adjusting quantities or removing items.
To remove an item from the cart call the update_cart method with the full current cart information (omitting the removed item):
Or if the cart has been completely emptied provide an empty array:
Purchase
Send this event after a successful checkout. This clears abandoned cart state and enables revenue attribution.
Purchase Fields
price_value – Total purchase amount
purchase_id – Unique order identifier
If a purchase event is sent without item data, Pushly will still clear the user’s cart state.
Required Fields Summary
idis required for all itemsquantityis required only when tracking cart or purchase quantitiesOnly one of
products,events, orrecipesshould be included per call
Implementation Best Practices
Initialize the SDK early in the page lifecycle to avoid missed events.
Use consistent item IDs across all interaction types so Pushly can correctly associate behavior.
Trigger purchase events from a reliable confirmation step whenever possible to avoid false abandoned cart notifications.
Last updated