E-Commerce Funnel
The full conversion funnel with all stages, code examples, and the properties reference.
The complete conversion funnel with all stages. Send these events in the order they occur on your website — Tugus automatically maps them to each platform's schema (Meta CAPI, GA4 items, TikTok contents, Klaviyo items).
The examples below use the browser SDK: tugus.track(name, payload) sends the
payload object as the event's data automatically. For server-to-server
calls you build the envelope yourself — the same fields go inside a nested
data object (see HTTP API and the
Payload Reference).
view_item_list
Category page or search result list displayed.
tugus.track('view_item_list', {
item_list_id: 'cat_42',
item_list_name: 'Sneaker',
contents: [
{ id: 'SKU-12345', name: 'Sneaker X Pro', price: 89.90 },
{ id: 'SKU-12346', name: 'Sneaker Y Lite', price: 59.90 },
],
})view_content
Product detail page (PDP) opened.
tugus.track('view_content', {
content_id: 'SKU-12345',
content_name: 'Sneaker X Pro',
content_category: 'Sneaker',
content_type: 'product',
value: 89.90,
currency: 'EUR',
brand: 'Acme',
})add_to_cart
tugus.track('add_to_cart', {
content_id: 'SKU-12345',
content_name: 'Sneaker X Pro',
value: 89.90,
currency: 'EUR',
quantity: 1,
})view_cart
Cart page opened — on JTL: /Warenkorb, on Shopify: /cart.
tugus.track('view_cart', {
value: 179.80,
currency: 'EUR',
num_items: 2,
contents: [
{ id: 'SKU-12345', quantity: 1, price: 89.90 },
{ id: 'SKU-67890', quantity: 1, price: 89.90 },
],
})initiate_checkout
Checkout entry — the login or register step.
tugus.track('initiate_checkout', {
value: 179.80,
currency: 'EUR',
num_items: 2,
contents: [
{ id: 'SKU-12345', quantity: 1, price: 89.90 },
{ id: 'SKU-67890', quantity: 1, price: 89.90 },
],
})add_shipping_info
Shipping address + shipping method entered.
tugus.track('add_shipping_info', {
value: 179.80,
currency: 'EUR',
shipping_tier: 'standard',
contents: [/* ... */],
})add_payment_info
Payment method selected.
tugus.track('add_payment_info', {
value: 179.80,
currency: 'EUR',
payment_type: 'credit_card',
contents: [/* ... */],
})purchase
Order completed. Required: value + currency (enforced server-side for
purchase/refund). order_id is strongly recommended for deduplication.
tugus.track('purchase', {
order_id: 'ORD-2024-001',
value: 179.80,
currency: 'EUR',
shipping: 4.90,
tax: 28.65,
coupon: 'BLACKFRIDAY',
contents: [
{ id: 'SKU-12345', name: 'Sneaker X Pro', quantity: 1, price: 89.90 },
{ id: 'SKU-67890', name: 'Socken Pack', quantity: 1, price: 89.90 },
],
user: {
email: 'kunde@example.com',
phone: '+4917612345678',
first_name: 'Max',
last_name: 'Mustermann',
zip: '80331',
country: 'DE',
},
})purchase — server-to-server
The same event over raw HTTP. Note the nested data object:
{
"event": "purchase",
"event_id": "purchase_ORD-2024-001",
"data": {
"order_id": "ORD-2024-001",
"value": 179.80,
"currency": "EUR",
"shipping": 4.90,
"tax": 28.65,
"coupon": "BLACKFRIDAY",
"contents": [
{ "id": "SKU-12345", "name": "Sneaker X Pro", "quantity": 1, "price": 89.90 },
{ "id": "SKU-67890", "name": "Socken Pack", "quantity": 1, "price": 89.90 }
]
},
"user": { "email": "kunde@example.com", "country": "DE" }
}refund
Refund issued. Send order_id, plus optional items for partial returns.
tugus.track('refund', {
order_id: 'ORD-2024-001',
value: 89.90,
currency: 'EUR',
contents: [
{ id: 'SKU-67890', quantity: 1, price: 89.90 },
],
})add_to_wishlist / remove_from_cart
Work the same way as add_to_cart:
tugus.track('add_to_wishlist', {
content_id: 'SKU-12345', value: 89.90, currency: 'EUR',
})
tugus.track('remove_from_cart', {
content_id: 'SKU-12345', quantity: 1, value: 89.90, currency: 'EUR',
})Deduplication: Tugus generates a deterministic event_id from order_id + event_name. For purchase and refund, events sent twice are therefore protected against duplicates on both the browser and server side.
Properties reference
An overview of all available fields per event. With the browser SDK these are
the keys of the tugus.track() payload; over HTTP they live inside the data
object.
| Field | Type | Required | Description |
|---|---|---|---|
value | float | Required¹ | Total monetary value. Required for purchase/refund. |
currency | string | Required¹ | ISO 4217, 3 letters (e.g. EUR). Required for purchase/refund. Auto-uppercased. |
order_id | string | Recommended | Order/transaction ID — drives dedup for purchase/refund. |
content_id | string | Optional | Single-product SKU. |
content_name | string | Optional | Product name. |
content_category | string | Optional | Category name. |
content_type | string | Optional | Default product; also home_listing, travel. |
brand | string | Optional | Brand name. |
quantity | int | Optional | Single-item quantity. |
num_items | int | Optional | Total items. Auto-calculated from contents. |
contents | array | Optional | Multi-product cart, see below. |
shipping | float | Optional | Shipping cost. |
tax | float | Optional | Tax portion. |
coupon | string | Optional | Coupon code. |
shipping_tier | string | Optional | Shipping method for add_shipping_info. |
payment_type | string | Optional | Payment method for add_payment_info. |
item_list_id | string | Optional | Category/list ID for view_item_list. |
item_list_name | string | Optional | Category/list name. |
promotion_id | string | Optional | For view_promotion/select_promotion. |
promotion_name | string | Optional | Promotion name. |
contents[] — item schema
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Required | Product SKU / identifier. |
name | string | Optional | Product name. |
price | float | Optional | Unit price (not total price). |
quantity | int | Optional | Quantity (default: 1). |
category | string | Optional | Category name. |
brand | string | Optional | Brand name. |
variant | string | Optional | Variant (e.g. color, size). |
coupon | string | Optional | Item-level coupon. |
discount | float | Optional | Item-level discount. |
¹ value and currency are optional for funnel events (view_content,
add_to_cart, …) but required for purchase and refund — the collect
endpoint rejects those with 422 if either is missing.