Developer Docs
JavaScript SDK
Enhanced Conversions

Enhanced Conversions

Enhanced conversions send SHA-256 hashed customer data alongside conversion events to ad platforms. This allows Google Ads, Meta, and Microsoft Ads to match conversions to ad clicks with significantly higher accuracy.

Impact: Enhanced conversions improve conversion matching by up to 30% compared to standard tracking. The more user data fields you provide, the better the match rate.

How it works

  1. You provide plain-text customer data (email, phone, name, address)
  2. The Convultra SDK hashes each field using SHA-256 before sending
  3. Convultra forwards the hashed data to connected ad platforms
  4. Ad platforms match hashes against their user databases to attribute conversions

No PII is stored in plain text. All customer data is one-way hashed client-side before it leaves the browser. This is compliant with GDPR, CCPA, and each ad platform's data policies.


User data fields

FieldTypeDescription
emailstringCustomer email address (required if phone is not provided)
phonestringCustomer phone number with country code (required if email is not provided)
firstNamestringCustomer first name
lastNamestringCustomer last name
address.streetstringStreet address
address.citystringCity
address.regionstringState, province, or region
address.postalCodestringPostal / ZIP code
address.countrystringISO 3166-1 alpha-2 country code (US, GB, DE, etc.)
💡

At minimum, provide email or phone. Each additional field improves match accuracy. For best results, include email, phone, first name, and last name.


Approach 1: Enhance the last conversion

Track a conversion first, then call enhance() to attach user data to it.

// Step 1: Track the conversion
Convultra.trackPurchase({
  orderId: 'order_8842',
  value: 149.99,
  currency: 'USD'
})
 
// Step 2: Enhance it with customer data
Convultra.enhance({
  email: '[email protected]',
  phone: '+14155551234',
  firstName: 'Sarah',
  lastName: 'Chen'
})

enhance() always applies to the most recently tracked conversion. Call it immediately after your track* call.


Approach 2: Track and enhance in one call

Use trackConversion() with the third userData parameter to send conversion data and user data together.

Convultra.trackConversion('purchase', {
  orderId: 'order_8842',
  value: 149.99,
  currency: 'USD'
}, {
  email: '[email protected]',
  phone: '+14155551234',
  firstName: 'Sarah',
  lastName: 'Chen',
  address: {
    street: '123 Market St',
    city: 'San Francisco',
    region: 'CA',
    postalCode: '94105',
    country: 'US'
  }
})

Approach 3: Enhanced convenience methods

Dedicated methods that combine tracking and enhancement for common conversion types.

trackEnhancedPurchase

Convultra.trackEnhancedPurchase(
  // Conversion data
  {
    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 }
    ]
  },
  // User data
  {
    email: '[email protected]',
    phone: '+14155551234',
    firstName: 'Sarah',
    lastName: 'Chen'
  }
)

trackEnhancedLead

Convultra.trackEnhancedLead(
  {
    leadId: 'lead_2291',
    value: 50.00,
    source: 'pricing-page-form'
  },
  {
    email: '[email protected]',
    firstName: 'David',
    lastName: 'Park',
    phone: '+442071234567'
  }
)

trackEnhancedSignup

Convultra.trackEnhancedSignup(
  {
    userId: 'usr_90112',
    plan: 'pro-monthly'
  },
  {
    email: '[email protected]',
    firstName: 'Alex',
    lastName: 'Rivera'
  }
)

Approach 4: Set user data for all subsequent conversions

If you know the customer's identity early (e.g., they are logged in), use setEnhancedUserData() to set user data once. All subsequent conversion calls in the session will automatically include it.

// Set once — applies to all conversions in this session
Convultra.setEnhancedUserData({
  email: '[email protected]',
  phone: '+14155551234',
  firstName: 'Sarah',
  lastName: 'Chen'
})
 
// These conversions automatically include the user data above
Convultra.trackAddToCart({ productId: 'prod_001', productName: 'Running Shoes', value: 89.99 })
Convultra.trackBeginCheckout({ value: 149.99, currency: 'USD' })
Convultra.trackPurchase({ orderId: 'order_8842', value: 149.99, currency: 'USD' })

setEnhancedUserData() persists for the duration of the page session. If the user navigates to a new page (full page load), you need to call it again. In SPAs (React, Vue, etc.), it persists across route changes.


Full example: Enhanced checkout

A complete example on a post-checkout thank-you page with all available user data fields:

<script>
  Convultra.trackEnhancedPurchase(
    {
      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 }
      ]
    },
    {
      email: '[email protected]',
      phone: '+14155551234',
      firstName: 'Sarah',
      lastName: 'Chen',
      address: {
        street: '123 Market St',
        city: 'San Francisco',
        region: 'CA',
        postalCode: '94105',
        country: 'US'
      }
    }
  )
</script>

Enabling enhanced conversions

Enhanced conversions must be enabled per ad platform in your integration settings:

  1. Go to Dashboard → Integrations
  2. Click the ad platform (Google Ads, Meta, or Microsoft Ads)
  3. Toggle Enhanced Conversions to enabled
  4. Save
⚠️

If enhanced conversions are not enabled for a platform, user data will be captured but not forwarded to that platform. Enable it for each platform you want to receive enhanced data.

Privacy and compliance

  • All user data is hashed with SHA-256 client-side before transmission
  • Plain-text PII never reaches Convultra servers
  • Compliant with GDPR (EU), CCPA (California), and ad platform data policies
  • Hashing is one-way — original data cannot be recovered from hashes
  • You are responsible for having appropriate consent to collect and process customer data