Use this guide when you want to send completed purchase events from your storefront to Cevoid. This guide focuses on implementation flow. For the fullDocumentation Index
Fetch the complete documentation index at: https://docs.cevoid.com/llms.txt
Use this file to discover all available pages before exploring further.
trackSale() payload reference, use Tracking Events.
When to use trackSale()
Call trackSale() when a purchase is completed and you have a final order record. Typical places include:
- Order confirmation pages
- Checkout success callbacks
- Server-confirmed storefront completion handlers
trackSale() before the order is actually completed.
1. Initialize the SDK
Initialize the SDK once before sending the conversion event.2. Optionally identify the shopper
If you already know the shopper identity, callidentify() first so the conversion event can include that context.
3. Send the sale event
UsetrackSale() with the final order data.
orderIdcurrencyrevenue
marketIdcustomerIdskus
revenue must be sent as a decimal major-unit amount in the same currency as currency, such as 129.99 USD.
4. Choose a stable trigger point
Only send one conversion event per completed order. Recommended trigger points:- A confirmed order-complete route
- A checkout success page after payment confirmation
- A purchase completion event from your commerce platform
trackSale() from:
- Cart pages
- Checkout start events
- Optimistic client-side states before the order is confirmed
Example: storefront confirmation page
Common mistakes
- Firing the event before payment is confirmed
- Sending duplicate conversions on page reload
- Sending the wrong
currencyfor therevenueamount - Sending formatted currency strings instead of numeric
revenue