Event Tracking - Standard Events
Snaps uses a set of standard events geared toward e-commerce. Using standard events allows us to offer detailed, up-to-date analytics in your dashboard.
Please include as much metadata about each event as you can so that we can provide your users with the best experience.
completeOrder
The completeOrder
event type should be used on a successful checkout. The event supports the metadata in the table below. Please note that order_id, line_items, and total_price are the only required fields - everything else is optional. We recommend you include any additional fields that would be necessary to perform an order lookup, such as a billing zip code.
Property | Value |
---|---|
Required order_id | javascript order_id: "" |
javascript email: "[email protected]" | |
Required line_items | javascript line_items: { id: 669751112, price: "199.99", // (REQ) product_id: 7513594, // (REQ) quantity: 1, (REQ) title: "IPod Nano", // (REQ) } |
Required total_price | Requiredjavascript total_price: "" |
currency | javascript currency: "USD" |
discount_codes | javascript discount_codes: [ { amount: "", code: "", type: "percentage" } ] |
total_discounts | javascript total_discounts: "" |
total_tax | javascript total_tax: "" |
order_status_url | javascript order_status_url: "" |
Add to Cart and View Product Events
For both events, the only required information are the id, title, and price.
If sending events server-to-server, please also include a user_id field.
addToCart
The addToCart
event type should be used when a customer adds a product to their cart. The event supports the following metadata:
Required id | javascript id: "" |
Required title | javascript title: "" |
Required price | javascript price: "" |
quantity | javascript quantity: "" |
user_id | javascript user_id: "" |
viewProduct
The viewProduct
event type should be used when a customer views a product on your website. The event supports the following metadata:
Required id | javascript id: "" |
Required title | javascript title: "" |
Required price | javascript price: "" |
quantity | javascript quantity: "" |
user_id | javascript user_id: "" |
Updated about 3 years ago