Skip to main content
Version: current (0.10)

Track Conversion

Records the moment someone does what you wanted them to do: a purchase, signup, deposit, or lead. Lucia credits this event to the campaign that earned it, so call it wherever a conversion actually happens.

LuciaSDK.trackConversion(eventTag: string, amount: number, eventDetails: object): Promise<void>
ArgumentWhat to pass
eventTagA name for the conversion, e.g. 'purchase' or 'signup'.
amountIts value. Use 0 if it has no monetary value.
eventDetailsAny extra fields you want in reports (product, plan, quantity).

Example

LuciaSDK.trackConversion('purchase', 240, {
plan: 'pro',
billing: 'annual',
});
Already using the SDK?

These examples assume the SDK is installed and initialized. New to it? Start with the Quickstart — the SDK API Reference covers every install option.