Skip to content

E-commerce events

Track the shopping funnel with trackViewContent, trackAddToCart, trackAddToWishlist, trackBeginCheckout, trackAddPaymentInfo and trackSearch.

article |5 min |Updated Sep 2026
On this page · 9 sections

These events cover the shopping funnel from product discovery to checkout. They are micro events: they show up on the Events page, in funnels, and on the Conversions page under the All events filter; they never count toward your plan’s conversion limit, and they are not forwarded to ad platforms. The final purchase uses trackPurchase.

Prerequisite: the SDK is installed. See Installing the tracking script.

trackViewContent

A product or content page view.

Convultra.trackViewContent({
  contentId: 'prod_001',
  contentName: 'Running Shoes - Ultralight Pro',
  value: 89.99,
  currency: 'USD'
})
ParameterTypeRequiredDescription
contentIdstringNoProduct or content identifier
contentNamestringNoProduct or content name
valuenumberNoPrice or content value
currencystringNoISO 4217 code

trackAddToCart

An item added to the cart.

Convultra.trackAddToCart({
  productId: 'prod_001',
  productName: 'Running Shoes - Ultralight Pro',
  value: 89.99,
  quantity: 1,
  currency: 'USD'
})
ParameterTypeRequiredDescription
productIdstringNoProduct identifier
productNamestringNoProduct name
valuenumberNoItem price
quantitynumberNoItems added
currencystringNoISO 4217 code

trackAddToWishlist

An item saved to a wishlist.

Convultra.trackAddToWishlist({
  productId: 'prod_001',
  productName: 'Running Shoes - Ultralight Pro',
  value: 89.99,
  currency: 'USD'
})
ParameterTypeRequiredDescription
productIdstringNoProduct identifier
productNamestringNoProduct name
valuenumberNoItem price
currencystringNoISO 4217 code

trackBeginCheckout

Checkout started.

Convultra.trackBeginCheckout({
  value: 169.97,
  currency: 'USD',
  items: [
    { id: 'prod_001', name: 'Running Shoes - Ultralight Pro', price: 89.99, quantity: 1 },
    { id: 'prod_044', name: 'Sport Socks 3-Pack', price: 19.99, quantity: 1 },
    { id: 'prod_112', name: 'Insole Comfort Gel', price: 59.99, quantity: 1 }
  ]
})
ParameterTypeRequiredDescription
valuenumberNoTotal checkout value
currencystringNoISO 4217 code
itemsarrayNoItems in the checkout

trackAddPaymentInfo

Payment details entered during checkout.

Convultra.trackAddPaymentInfo({
  value: 169.97,
  currency: 'USD',
  paymentType: 'credit_card'
})
ParameterTypeRequiredDescription
valuenumberNoOrder value
currencystringNoISO 4217 code
paymentTypestringNocredit_card, paypal, apple_pay and so on

trackSearch

An on-site search.

Convultra.trackSearch({
  searchTerm: 'running shoes lightweight',
  resultsCount: 24
})
ParameterTypeRequiredDescription
searchTermstringNoThe query
resultsCountnumberNoResults returned

Full funnel example

Each call sits on the relevant page or is triggered by the matching action.

Product page: view content

// User lands on a product page
Convultra.trackViewContent({
  contentId: 'prod_001',
  contentName: 'Running Shoes - Ultralight Pro',
  value: 89.99,
  currency: 'USD'
})

Product page: add to cart

// User clicks "Add to Cart"
Convultra.trackAddToCart({
  productId: 'prod_001',
  productName: 'Running Shoes - Ultralight Pro',
  value: 89.99,
  quantity: 1,
  currency: 'USD'
})

Cart page: begin checkout

// User clicks "Proceed to Checkout"
Convultra.trackBeginCheckout({
  value: 109.98,
  currency: 'USD',
  items: [
    { id: 'prod_001', name: 'Running Shoes - Ultralight Pro', price: 89.99, quantity: 1 },
    { id: 'prod_044', name: 'Sport Socks 3-Pack', price: 19.99, quantity: 1 }
  ]
})

Checkout page: add payment info

// User enters card details and clicks "Continue"
Convultra.trackAddPaymentInfo({
  value: 109.98,
  currency: 'USD',
  paymentType: 'credit_card'
})

Confirmation page: purchase

// Order completed: track the purchase
Convultra.trackPurchase({
  orderId: 'order_8842',
  value: 109.98,
  currency: 'USD',
  items: [
    { id: 'prod_001', name: 'Running Shoes - Ultralight Pro', price: 89.99, quantity: 1 },
    { id: 'prod_044', name: 'Sport Socks 3-Pack', price: 19.99, quantity: 1 }
  ]
})

Single-page apps (React, Vue, Next.js)

Trigger events from component logic rather than page loads:

// React example: Add to Cart button
function ProductPage({ product }) {
  const handleAddToCart = () => {
    // Add to your cart state
    addToCart(product)

    // Track the event
    Convultra.trackAddToCart({
      productId: product.id,
      productName: product.name,
      value: product.price,
      quantity: 1,
      currency: 'USD'
    })
  }

  return (
    <button onClick={handleAddToCart}>
      Add to Cart
    </button>
  )
}

Place Convultra calls after your application logic succeeds. Track addToCart after the item is in state, and purchase after your backend confirms the order, not before.

Reading funnels back

The API has get_funnel, which counts sessions completing an ordered sequence of 2 to 6 event types, for example steps=pageview,add_to_cart,purchase. Call list_events first to confirm the exact event names your site records.