Use window.Convertmax.track(eventName, payload) after the tracking script is loaded.
Core supported events
| Event | Purpose | Typical payload keys |
|---|---|---|
page_view |
Records page visits and page states | product, event_type |
click |
Tracks click interactions | custom per click context |
add_cart |
Tracks add-to-cart actions | id, quantity, recommendation (optional) |
convert |
Tracks completed order conversion | id, revenue, customer, email, products |
search |
Tracks search actions and search-result clicks | query, hits or sio_* search fields |
custom |
Tracks custom business events | type plus event-specific fields |
Page view example (page_view)
if (window.Convertmax) {
window.Convertmax.track("page_view", {
product: "PRODUCT_ID",
event_type: "page"
});
}
Click example (click)
if (window.Convertmax) {
window.Convertmax.track("click", {
target: "hero_cta",
page: "https://example.com/pricing"
});
}
Add to cart example (add_cart)
if (window.Convertmax) {
window.Convertmax.track("add_cart", {
id: "PRODUCT_ID",
quantity: 1,
recommendation: true
});
}
Checkout conversion example (convert)
if (window.Convertmax) {
window.Convertmax.track("convert", {
id: "ORDER_ID",
revenue: "199.00",
customer: "USER_ID",
email: "buyer@example.com",
products: [
{
id: "PRODUCT_ID",
name: "Product name",
sku: "PRODUCT_SKU",
category: "Parent - Child",
price: "199.00",
quantity: 1
}
]
});
}
Quote completion example (custom)
if (window.Convertmax) {
window.Convertmax.track("custom", {
type: "quote",
id: "QUOTE_ID",
quote_subtotal: "299.00",
customer: "USER_ID",
email: "buyer@example.com",
products: [
{
id: "PRODUCT_ID",
name: "Product name",
sku: "PRODUCT_SKU",
category: "Parent - Child",
price: "299.00",
quantity: 1
}
]
});
}
Search example (search)
if (window.Convertmax) {
window.Convertmax.track("search", {
query: "running shoes",
hits: 42
});
}