ConverlayConverlay

Identifying Users

Use converlay.identify() to associate the current visitor with customer data. This improves match rates on ad platforms like Meta CAPI and TikTok Events API.

API

identify()
converlay.identify({
  customerId: 'cust_12345',
  email: 'jane@example.com',
  phone: '+15551234567',
  firstName: 'Jane',
  lastName: 'Doe',
})

IdentifyData fields

FieldTypeDescription
customerIdstringYour internal customer ID
emailstringCustomer email address
phonestringPhone number (E.164 format recommended)
firstNamestringCustomer first name
lastNamestringCustomer last name

PII hashing

All personally identifiable information (email, phone, name) is sent in plain text to the Converlay collection endpoint, then hashed with SHA-256 on the server before forwarding to ad platforms. Country-specific normalization (lowercasing, whitespace trimming, phone formatting) is applied before hashing.

When to call identify

  • After login — as soon as the customer authenticates
  • On checkout — when shipping/billing info is available
  • On account page — when the customer views or updates their profile

Identity data persists for the current session. Subsequent track() calls will include the identified user's data automatically.

Examples

After login

typescript
async function handleLogin(email, password) {
  const user = await api.login(email, password)

  // Identify after login
  converlay.identify({
    customerId: user.id,
    email: user.email,
    firstName: user.firstName,
    lastName: user.lastName,
  })
}

On checkout completion

typescript
function onCheckoutComplete(order) {
  // Identify + track purchase
  converlay.identify({
    customerId: order.customerId,
    email: order.email,
    phone: order.phone,
    firstName: order.shippingAddress.firstName,
    lastName: order.shippingAddress.lastName,
  })

  converlay.track('purchase', {
    ecommerce: {
      transaction_id: order.id,
      value: order.total,
      currency: order.currency,
      items: order.lineItems.map(item => ({
        item_id: item.variantId,
        item_name: item.title,
        price: item.price,
        quantity: item.quantity,
      })),
    },
  })
}