# Standard and conversion events

> The event names Lemu recognises, the fields an order needs (value, currency and order_id), and how revenue and ROI are calculated

URL: https://docs.lemuai.com/website-pixel/standard-events

Lemu uses Meta Pixel's standard events exactly as Meta defines them: the same names and the same parameters. If your site or app already sends events to Meta, you can send the same calls to Lemu unchanged. The same names work everywhere: the website snippet, the app SDKs, the [Send an Event API](https://docs.lemuai.com/api-reference/events/trigger) and Shopify.

Only **conversion events** have required fields. By default that is `Purchase`, because journey and campaign revenue and ROI are calculated from it. Every other event is free-form.

## Meta's standard events

| Event | Meaning | Parameters Meta lists |
|---|---|---|
| `PageView` | A page loaded. The website snippet sends it for you | |
| `ViewContent` | A product or other key page was viewed | `content_ids`, `content_category`, `content_name`, `content_type`, `contents`, `currency`, `value` |
| `Search` | A search | `search_string`, `content_category`, `content_ids`, `contents`, `currency`, `value` |
| `AddToCart` | An item was added to the cart | `content_ids`, `content_name`, `content_type`, `contents`, `currency`, `value` |
| `AddToWishlist` | An item was added to a wishlist | `content_ids`, `content_name`, `content_category`, `contents`, `currency`, `value` |
| `InitiateCheckout` | Checkout started | `content_ids`, `content_category`, `contents`, `currency`, `num_items`, `value` |
| `AddPaymentInfo` | Payment details were entered | `content_ids`, `content_category`, `contents`, `currency`, `value` |
| `Purchase` | An order was placed | `value` and `currency` (required by Meta), `content_ids`, `content_name`, `content_type`, `contents`, `num_items`, plus `order_id` for Lemu |
| `Lead` | A lead was submitted | `content_category`, `content_name`, `currency`, `value` |
| `CompleteRegistration` | A sign-up was completed | `content_name`, `currency`, `status`, `value` |
| `Subscribe` | A paid subscription started | `currency`, `predicted_ltv`, `value` |
| `StartTrial` | A free trial started | `currency`, `predicted_ltv`, `value` |
| `Schedule` | An appointment was booked | |
| `SubmitApplication` | An application was submitted | |
| `Contact` | Someone contacted your business | |
| `CustomizeProduct` | A product was customised | |
| `Donate` | A donation | |
| `FindLocation` | Someone searched for a store location | |

What the parameters mean:

| Parameter | Type | Meaning |
|---|---|---|
| `value` | number | An amount in major units: `1499.5` is ₹1,499.50 |
| `currency` | string | An ISO 4217 code such as `INR` |
| `content_ids` | list of strings | Product ids or SKUs |
| `contents` | list of objects | Items, each with `id` and `quantity`, and optionally `item_price`, `title`, `brand` and `category` |
| `content_type` | string | `product` or `product_group` |
| `content_name`, `content_category` | string | A name and a category |
| `num_items` | integer | The number of items |
| `search_string` | string | What was searched for |
| `predicted_ltv` | number | The expected lifetime value of a subscriber |
| `status` | string | The status of a registration |

You can add your own parameters next to these, for example `payment_method: "cod"` or `coupon`. For Meta's full definitions, see Meta's [standard events reference](https://developers.facebook.com/docs/meta-pixel/reference).

### What `value` means on each event

`value` follows Meta's definition, which is different on each step of the funnel:

- On `AddToCart`, it is the value of what was added, not the cart total.
- On `InitiateCheckout`, it is the checkout (cart) total. Use this event's `value` for abandoned-cart conditions on cart value.
- On `Purchase`, it is the order total.

If you want a running cart total on `AddToCart`, send it as your own parameter, for example `cart_total`.

### Matching names

Matching a Meta name ignores case and separators. `purchase`, `PURCHASE` and `Purchase` are all stored as `Purchase`, and `add_to_cart`, `Add To Cart` and `AddToCart` are all stored as `AddToCart`.

A name that doesn't match one of Meta's events is a **custom event**. Custom events are allowed everywhere and are never renamed, rejected or reshaped. Personal data is still removed from their properties.

### App events

The app SDKs also send these events for you. They have no Meta equivalent and are never conversions:

| Event | When |
|---|---|
| `app_installed` | The first launch with the SDK |
| `app_updated` | The first launch after the app version changed |
| `app_opened` | The app is launched or comes back to the foreground |
| `app_backgrounded` | The app goes to the background |
| `deep_link_opened` | A link opens the app |
| `screen_viewed` | A screen is shown, when you track screens |

See the [event reference](https://docs.lemuai.com/sdks/events#app-lifecycle-events).

## Meta and Lemu side by side
```js
// Already on your site for Meta:
fbq("track", "Purchase", { value: 1499.5, currency: "INR", content_ids: ["SKU1"], content_type: "product" });

// The same call for Lemu, plus order_id:
lemu("track", "Purchase", { value: 1499.5, currency: "INR", content_ids: ["SKU1"], content_type: "product", order_id: "1042" });
```

For purchases you can also use `lemu("purchase", { value, currency, order_id })`, which sends the event straight away.

### Why Lemu adds `order_id`

Lemu counts one conversion per order. The same order is often reported more than once: by your website, by your app, by Shopify (from both the storefront and the store's order webhook), by your server, or by a reload of the thank-you page. With `order_id`, all of these count as one order, so revenue isn't counted twice. Without it, every `Purchase` event counts as its own order.

Meta's Conversions API has the same field, so your order id fits both. Use the same order id your store and backend use.

## Conversion events

A conversion event is an event that counts as an order for revenue and ROI. The list is set under **Settings → Sending Limits → Conversion events**. The default is `Purchase`. You can add others, such as `Lead`, `Subscribe`, `Schedule`, or one of your own custom events. See [Sending Limits](https://docs.lemuai.com/settings/sending-limits#conversion-events).

Every conversion event needs three fields:

| Field | What it should be |
|---|---|
| `value` | A number, 0 or more, in major units |
| `currency` | An ISO 4217 code such as `INR` |
| `order_id` | Your id for the order, as text |

### When a field is missing

A conversion event is **never rejected** for a missing or wrong field. A missing field never drops an order. Instead Lemu does the following, and counts it:

| Problem | What Lemu does |
|---|---|
| `value` is text, such as `"1,499.00"` | Converts it to a number |
| `value` is missing, but an older field such as `total_price` or `total` has the amount | Uses that field |
| `value` is missing, isn't a number, or is negative | Counts the order with no revenue |
| `currency` is missing or isn't an ISO code | Uses your workspace currency |
| `order_id` is missing, but an older field such as `order_number` has it | Uses that field |
| `order_id` is missing | Counts the order, but the same order sent twice counts twice |

You can see these counts in two places:

- **Settings → Sending Limits**, under **Conversion events**: how many conversion events arrived in the last 30 days, and how many had each problem.
- The **Recent events** debugger on each [tracking source](https://docs.lemuai.com/website-pixel/overview#recent-events): each conversion event, marked **Conversion**, with what was missing or fixed.

Events that aren't conversion events go through none of these checks.

## How ROI is calculated

An order is credited to the **last** journey or campaign message the contact got, if that message came within the channel's attribution window. See [Sending Limits](https://docs.lemuai.com/settings/sending-limits#revenue-attribution).

- **Revenue** is the total `value` of the credited orders, per currency.
- **Message spend** is what the messages cost in money: WhatsApp charges from your WhatsApp wallet. Email (paid in credits) and calls (paid in plan minutes) are not priced, so they don't add to spend.
- **ROI** is revenue divided by message spend. `3.5x` means 3.5 back for each 1 spent. When there was no message spend in the period, ROI shows `–`.

A few details:

- Orders that arrived without a value count as orders but add nothing to revenue. Reports say how many there were, so a low ROI caused by missing data isn't mistaken for a poor journey.
- ROI uses revenue in the same currency as the spend. Revenue in other currencies is shown but left out of the ratio.

ROI is shown on each [journey's report](https://docs.lemuai.com/automation/reports#revenue-and-roi), on marketing campaigns and on the Copilot home in the [AI Copilot](https://docs.lemuai.com/copilot/overview).

## Old names that still match

Before standard events, Lemu's website pixel and Shopify connection used their own names. These old names still match their Meta event everywhere you name an event: journey triggers, exit events, **Wait for reaction**, segments, the Event Log filter and **Conversion events**. A journey on `Purchase` also starts for an event sent as `order_placed`, and the other way round.

| Old name | Matches |
|---|---|
| `order_placed`, `checkout_completed` | `Purchase` |
| `cart_added`, `checkout_started` | `InitiateCheckout` |
| `added_to_cart` | `AddToCart` |
| `viewed_product` | `ViewContent` |
| `page_viewed` | `PageView` |
| `searched` | `Search` |
| `checkout_payment_submitted` | `AddPaymentInfo` |

`cart_added` matches `InitiateCheckout`, not `AddToCart`, because it was always sent when a shopper started checkout.

Saved journeys, segments and the **Conversion events** setting that used these old names were renamed to the Meta names for you. Events you sent before keep the name they were stored with, and still match. Your own custom event names were not changed.

## Send purchases from your server too

A purchase sent from a browser or an app can be lost: the app is closed right after payment, or an ad blocker stops the script. For the most reliable revenue and ROI, also send `Purchase` from your backend with the [Send an Event API](https://docs.lemuai.com/api-reference/events/trigger):
```bash
curl -X POST https://app.lemuai.com/api/v1/events \
  -H "X-API-Key: lemu_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "event_type": "Purchase",
    "phone": "+919876543210",
    "data": { "value": 1499.5, "currency": "INR", "order_id": "1042" }
  }'
```

Keep sending it from your site or app as well. With the same `order_id`, both count as one order. Shopify stores already send orders from the store's order webhook (see [Shopify](https://docs.lemuai.com/integrations/shopify#store-events)).
