Learn how to track sale conversion events with Segment and Dub
sale
event happens when a user purchases your product or service. Examples include:
Add Dub (Actions) destination
Configure Dub API Key
Add Mapping
Send sale events to Dub
@segment/analytics-node
SDK to send sale events to Segment.Make sure to include relevant properties such as userId
, payment_processor
, order_id
, currency
, and revenue
in the payload.Property | Required | Description |
---|---|---|
customerExternalId | Yes | The unique ID of the customer in your system. Will be used to identify and attribute all future events to this customer. |
amount | Yes | The amount of the sale in cents. |
paymentProcessor | Yes | The payment processor that processed the sale. (E.g. Stripe, Shopify) |
eventName | No | The name of the event. Defaults to “Purchase”. |
invoiceId | No | The invoice ID of the sale. Can be used as a idempotency key – only one sale event can be recorded for a given invoice ID. |
currency | No | The currency of the sale. Defaults to “usd”. |
metadata | No | An object containing additional information about the sale. |