Tracking conversions
Method reference for trackPurchase, trackLead, trackSignup, trackSubscription, trackDownload, trackContact, trackSchedule and trackConversion.
On this page · 10 sections
The SDK has a dedicated method for each conversion type. Each sends the event to Convultra, which forwards it to connected ad platforms. Google Ads and OpenAI Ads forwarding are live; Meta, Microsoft Ads and TikTok are coming soon.
Prerequisite: the SDK is installed on the page. See Installing the tracking script.
trackPurchase
E-commerce purchases and completed transactions.
Convultra.trackPurchase({
orderId: 'order_8842',
value: 149.99,
currency: 'USD',
items: [
{ id: 'prod_001', name: 'Running Shoes', price: 89.99, quantity: 1 },
{ id: 'prod_044', name: 'Sport Socks 3-Pack', price: 19.99, quantity: 3 }
]
})
| Parameter | Type | Required | Description |
|---|---|---|---|
orderId | string | Yes | Unique order identifier |
value | number | Yes | Total order value |
currency | string | Yes | ISO 4217 code (USD, EUR, GBP and so on) |
items | array | No | Purchased items |
trackLead
Lead form submissions: contact forms, quote requests, demo requests.
Convultra.trackLead({
leadId: 'lead_2291',
value: 50.00,
email: 'sarah@company.com',
source: 'pricing-page-form'
})
| Parameter | Type | Required | Description |
|---|---|---|---|
leadId | string | No | Unique lead identifier |
value | number | No | Estimated lead value |
email | string | No | Lead email address |
source | string | No | Form name, page or other origin |
trackSignup
User registrations and account creations.
Convultra.trackSignup({
userId: 'usr_90112',
plan: 'pro-monthly',
email: 'alex@startup.io'
})
| Parameter | Type | Required | Description |
|---|---|---|---|
userId | string | No | Unique user identifier |
plan | string | No | Plan or tier |
email | string | No | User email address |
trackSubscription
Subscription starts or recurring billing events.
Convultra.trackSubscription({
subscriptionId: 'sub_441829',
value: 29.99,
plan: 'team-annual',
currency: 'USD'
})
| Parameter | Type | Required | Description |
|---|---|---|---|
subscriptionId | string | No | Unique subscription identifier |
value | number | No | Subscription value |
plan | string | No | Plan name or tier |
currency | string | No | ISO 4217 code |
trackDownload
File downloads: whitepapers, ebooks, software, resources.
Convultra.trackDownload({
downloadId: 'dl_8821',
fileName: '2025-marketing-report.pdf',
fileType: 'pdf'
})
| Parameter | Type | Required | Description |
|---|---|---|---|
downloadId | string | No | Unique download identifier |
fileName | string | No | Downloaded file name |
fileType | string | No | File type or extension |
trackContact
Contact form submissions: general inquiries, support requests.
Convultra.trackContact({
contactId: 'cnt_3392',
formName: 'footer-contact-form'
})
| Parameter | Type | Required | Description |
|---|---|---|---|
contactId | string | No | Unique contact identifier |
formName | string | No | Form name or identifier |
trackSchedule
Appointment bookings and scheduled calls.
Convultra.trackSchedule({
scheduleId: 'sch_7710',
appointmentType: 'sales-demo'
})
| Parameter | Type | Required | Description |
|---|---|---|---|
scheduleId | string | No | Unique schedule identifier |
appointmentType | string | No | Demo, consultation and so on |
trackConversion (generic)
Any conversion type with a custom event name, for when the methods above do not fit.
Convultra.trackConversion('custom_trial_start', {
trialId: 'trial_5501',
value: 0,
plan: 'enterprise',
currency: 'USD'
})
Signature:
Convultra.trackConversion(eventType, data, userData)
| Parameter | Type | Required | Description |
|---|---|---|---|
eventType | string | Yes | Event name, for example custom_trial_start or webinar_registration |
data | object | Yes | Conversion data (value, currency, IDs) |
userData | object | No | Enhanced user data for matching. See Enhanced conversions in the SDK |
trackConversion also works with the standard types:
// These are equivalent
Convultra.trackPurchase({ orderId: 'order_123', value: 99.99, currency: 'USD' })
Convultra.trackConversion('purchase', { orderId: 'order_123', value: 99.99, currency: 'USD' })
Which events are conversions
Seven event types are conversions: purchase, lead, signup, subscription, download, contact and schedule. They feed the totals, are forwarded to ad platforms, and count toward your plan. Everything else, including add_to_cart, view_content, begin_checkout and any custom name you pass to trackConversion, is a micro event: recorded on the Events page, excluded from conversion counts, never forwarded, and free. There is no setting that turns a custom event name into a conversion; if something should be counted and forwarded, send it as one of the seven types. The API exposes this as is_conversion on every event row, so you never need to infer it from a name.
Full example: thank-you page
<!DOCTYPE html>
<html>
<head>
<!-- Convultra stub + async SDK -->
<script>
window.Convultra=window.Convultra||(function(){
var q=[];var c={q:q,initialized:false,config:{}};
['init','track','trackPurchase','trackLead','trackSignup','trackConversion',
'trackAddToCart','trackViewContent','trackBeginCheckout','enhance',
'setEnhancedUserData','identify','trackContact','trackSchedule',
'trackDownload','trackSubscription','trackAddPaymentInfo',
'trackAddToWishlist','trackSearch'].forEach(function(m){
c[m]=function(){q.push({m:m,a:Array.prototype.slice.call(arguments,0),t:Date.now()});return c;};
});
return c;
})();
</script>
<script async src="https://cdn.convultra.com/ultra.min.js" data-convultra-key="YOUR_API_KEY"></script>
</head>
<body>
<h1>Thank you for your order!</h1>
<script>
// Track the purchase: safe to call immediately, the stub queues it
Convultra.trackPurchase({
orderId: 'order_8842',
value: 149.99,
currency: 'USD',
items: [
{ id: 'prod_001', name: 'Running Shoes', price: 89.99, quantity: 1 },
{ id: 'prod_044', name: 'Sport Socks 3-Pack', price: 19.99, quantity: 3 }
]
})
</script>
</body>
</html>
Deduplication. Convultra deduplicates on orderId (or leadId, subscriptionId and so on). Sending the same order twice does not create a duplicate. Always pass one. See Deduplication.