Purchase

Track purchase actions to analyze performance. Send separate events for each distinct product, and group multiple purchases using the order ID.

This section is relevant for both FHR and XO customers.

Purchase actions are key to analyzing performance, as they are used to calculate purchase conversion rates and revenues. They can only be performed on confirmation of purchase.

Properties

{
    "action":"purchase",
    "target": {
        "product":"product-id"
    },
    "metadata": {
        "orderId": "order-id",
        "price": 3250,
        "quantity": 1,
        "currency": "EUR"
    }
}
Properties
Context
Description

action

All

Must be specified as "purchase"

target.product

All

The ID of the product that was purchased; must be identical with the product ID used in FHR/XO

metadata.*

All

Additional information, such as context or locale

metadata.quantity

All

The quantity of the product that was purchased

metadata.price

All

The price of the product that was purchased; must:

  • be in cents (i.e. without decimals)

  • be the product price, not the purchase total

  • take into account any discounts applied to the purchase

metadata.currency

All

The currency of the price, in ISO 4217 format

metadata.orderId

All

The ID of the purchase order as defined by your platform

Use the metadata.orderId to group purchase events, i.e. when a customer buys multiple products together.

You do not need to include a source ID for this event.

Last updated