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>
| Argument | What to pass |
|---|---|
eventTag | A name for the conversion, e.g. 'purchase' or 'signup'. |
amount | Its value. Use 0 if it has no monetary value. |
eventDetails | Any 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.