Track a Purchase
Send a purchase event with a stable transaction ID and item details.
Track a purchase
Send the purchase event when an order is confirmed. Use the same event shape in the browser, mobile app, or server API.
Pick where to send it
On an order confirmation page, send the event from the browser with virgo.track(). You can also send it from your backend with the API after payment is confirmed. The server-side option does not depend on the visitor reaching the confirmation page.
Send the event
Include a unique transaction_id, the value, the currency, and the items.
virgo.track("purchase", {
transaction_id: "ORD-20260615-7891",
value: 214.98,
currency: "USD",
tax: 17.20,
shipping: 5.99,
items: [
{ item_id: "JKT-WIND-M", item_name: "StormShield Windbreaker", price: 79.99, quantity: 1 },
{ item_id: "SNK-URBAN-10", item_name: "UrbanGlide Sneakers", price: 134.99, quantity: 1 }
]
});
Match your funnel events
Use the same item_id and item_name in view_item, add_to_cart, and purchase so the event stream stays consistent.
Verify it
Place a test order and inspect the next /collect/ request. Confirm that the batch contains eventName: "purchase" and returns 202.
Use one stable transaction_id for the same order. Do not intentionally send the same confirmed purchase more than once.
Standard Events
See the full purchase and Item Object parameters.