> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lemrock.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Measure ChatGPT Ads conversions

> Send your orders from your server so OpenAI credits sales to your ChatGPT Ads campaigns.

Only orders sent from your server reach OpenAI: the Lemrock Pixel alone isn't enough.

**Get the click ID → send the order from your server → test with Lemrock.**

## 1. Get the click ID

Visitors coming from a ChatGPT ad arrive with `?lrclid=lr_clk_...` in the URL. Save this value with the order:

* **If the [Lemrock Pixel](https://docs.lemrock.com/en/conversion-tracking/overview.md) is installed**, it stores it in the `lemrock_click` cookie. Read this cookie when the order is placed.
* **Otherwise**, read `lrclid` from the landing URL and keep it with the visitor's session until the order.

## 2. Send the order from your server

When the order is paid, send an `order_created` event to the [server API](https://docs.lemrock.com/en/conversion-tracking/server-api.md), with the saved `lrclid`. Your Lemrock contact gives you the API key.

```json theme={null}
{
  "event_id": "18569419850058",
  "event_type": "order_created",
  "event_time_ms": 1788954030123,
  "lrclid": "lr_clk_3xk9Qm2vT8LpW1nRz5bYcA",
  "data": {
    "type": "contents",
    "amount": 5198,
    "currency": "EUR",
    "contents": [{ "id": "63673152504138", "quantity": 2, "amount": 2599 }]
  }
}
```

* **`event_id` is the order ID.** If the pixel also sends the order, use the same one so it only counts once.
* **`contents[].id` uses the IDs from your [product feed](https://docs.lemrock.com/en/catalog/feeds.md).** Otherwise OpenAI can't link the sale to your products.
* **Send the order within 7 days.** OpenAI rejects older orders.
* **Only send orders from visitors who gave consent**, including for OpenAI (see [Add OpenAI to your CMP](https://docs.lemrock.com/en/chatgpt-ads/setup.md#3-add-openai-to-your-cmp)).

## 3. Test with Lemrock

Send a first order with `"validate_only": true`: it's checked without being recorded. Then tell your Lemrock contact, who confirms OpenAI received it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.