Skip to content

Tracking conversions

Method reference for trackPurchase, trackLead, trackSignup, trackSubscription, trackDownload, trackContact, trackSchedule and trackConversion.

article |6 min |Updated Sep 2026
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 }
  ]
})
ParameterTypeRequiredDescription
orderIdstringYesUnique order identifier
valuenumberYesTotal order value
currencystringYesISO 4217 code (USD, EUR, GBP and so on)
itemsarrayNoPurchased 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'
})
ParameterTypeRequiredDescription
leadIdstringNoUnique lead identifier
valuenumberNoEstimated lead value
emailstringNoLead email address
sourcestringNoForm name, page or other origin

trackSignup

User registrations and account creations.

Convultra.trackSignup({
  userId: 'usr_90112',
  plan: 'pro-monthly',
  email: 'alex@startup.io'
})
ParameterTypeRequiredDescription
userIdstringNoUnique user identifier
planstringNoPlan or tier
emailstringNoUser email address

trackSubscription

Subscription starts or recurring billing events.

Convultra.trackSubscription({
  subscriptionId: 'sub_441829',
  value: 29.99,
  plan: 'team-annual',
  currency: 'USD'
})
ParameterTypeRequiredDescription
subscriptionIdstringNoUnique subscription identifier
valuenumberNoSubscription value
planstringNoPlan name or tier
currencystringNoISO 4217 code

trackDownload

File downloads: whitepapers, ebooks, software, resources.

Convultra.trackDownload({
  downloadId: 'dl_8821',
  fileName: '2025-marketing-report.pdf',
  fileType: 'pdf'
})
ParameterTypeRequiredDescription
downloadIdstringNoUnique download identifier
fileNamestringNoDownloaded file name
fileTypestringNoFile type or extension

trackContact

Contact form submissions: general inquiries, support requests.

Convultra.trackContact({
  contactId: 'cnt_3392',
  formName: 'footer-contact-form'
})
ParameterTypeRequiredDescription
contactIdstringNoUnique contact identifier
formNamestringNoForm name or identifier

trackSchedule

Appointment bookings and scheduled calls.

Convultra.trackSchedule({
  scheduleId: 'sch_7710',
  appointmentType: 'sales-demo'
})
ParameterTypeRequiredDescription
scheduleIdstringNoUnique schedule identifier
appointmentTypestringNoDemo, 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)
ParameterTypeRequiredDescription
eventTypestringYesEvent name, for example custom_trial_start or webinar_registration
dataobjectYesConversion data (value, currency, IDs)
userDataobjectNoEnhanced 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.

Next in Developers E-commerce events →