Tracking Conversions
The Convultra SDK provides dedicated methods for each conversion type. Each method sends the event to the Convultra server, which forwards it to all connected ad platforms (Google Ads, Meta, Microsoft Ads) in real time.
Prerequisite: Make sure the SDK is installed on your page. See Installation for setup instructions.
trackPurchase
Track 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 currency code (USD, EUR, GBP, etc.) |
items | array | No | Array of purchased items |
trackLead
Track lead form submissions — contact forms, quote requests, demo requests.
Convultra.trackLead({
leadId: 'lead_2291',
value: 50.00,
email: '[email protected]',
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 | Where the lead came from (form name, page, etc.) |
trackSignup
Track user registrations and account creations.
Convultra.trackSignup({
userId: 'usr_90112',
plan: 'pro-monthly',
email: '[email protected]'
})| Parameter | Type | Required | Description |
|---|---|---|---|
userId | string | No | Unique user identifier |
plan | string | No | Plan or tier the user signed up for |
email | string | No | User email address |
trackSubscription
Track 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 (e.g., monthly or annual price) |
plan | string | No | Plan name or tier |
currency | string | No | ISO 4217 currency code |
trackDownload
Track 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 | Name of the downloaded file |
fileType | string | No | File type or extension |
trackContact
Track 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 | Name or identifier of the form |
trackSchedule
Track 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 | Type of appointment (demo, consultation, etc.) |
trackConversion (Generic)
Track any conversion type using a custom event name. Use this when the standard methods above do not fit your use case.
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 | Custom event name (e.g., custom_trial_start, webinar_registration) |
data | object | Yes | Conversion data (value, currency, IDs, etc.) |
userData | object | No | Enhanced user data for improved matching (see Enhanced Conversions) |
You can also use trackConversion with standard event 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' })Full example: Thank-you page
A complete example tracking a purchase on a post-checkout 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, 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 automatically deduplicates conversions by orderId (or leadId, subscriptionId, etc.). Sending the same order twice will not create duplicate conversions.