> Site index: https://usehardal.com/llms.txt
> Every content route also serves markdown at <url>.md

# AI Agent Attribution: Track Agent Checkouts and Conversions

AI agent attribution step by step: classify agent checkouts, store protocol source fields, verify signed agents and send agent orders server-side.

Source: https://usehardal.com/blog/ai-agent-attribution-checkout-tracking
Published: 2026-11-23T12:00:00
Updated: 2026-11-23T12:00:00
Author: Hardal
Category: Agentic Commerce

---

**AI agent attribution** means recording which orders an AI agent influenced or completed, and crediting the source correctly. Agents reach you in three ways: they refer a person, they browse your site themselves, or they check out through a protocol with no browser at all. Each path needs a different signal, and only backend order data covers all three.

Our [agentic commerce overview](https://usehardal.com/blog/agentic-commerce) explains why these orders slip past analytics. This post is the implementation guide: the fields to capture, the classification logic, and the server-side delivery that gets agent orders back to your ad platforms.

## The three agent conversion paths

| Path | What arrives | Reliable signal | Where to record it |
| --- | --- | --- | --- |
| Referred visit | A human session from an AI answer | Referrer, `utm_source`, landing page | Web analytics plus the order |
| Agent browsing | A cloud browser session acting for a person | Signed request headers, verified at the edge | Edge or server logs, flagged on the session |
| Agent checkout | An order created through ACP or UCP with no session | Protocol fields on the checkout and order | Backend order event |

Most teams measure only the first row, and even that one leaks. The other two are invisible to a client side tag by design.

## Step 1: Make the order the source of truth

Send every completed order from your backend when it is created, with a stable `event_id` equal to the order ID. Keep the browser purchase tag for the sessions where it fires, and let the shared ID deduplicate the two. This is the only setup that counts an order regardless of whether a browser was involved. Our [server-to-server glossary entry](https://usehardal.com/glossary/server-to-server) covers the pattern.

## Step 2: Capture protocol fields on agent checkouts

When an order comes through a commerce protocol, copy its source fields onto the order event before anything else touches them.

- **UCP.** Store the `UCP-Agent` header value, which points to the calling platform's profile, and the `attribution` object from the checkout. In the [UCP reference dated 2026-08-25](https://ucp.dev/2026-08-25/specification/reference/), `attribution` holds campaign identifiers, click IDs and source or medium markers, and it is copied to the order as a read-only snapshot.
- **ACP.** Store the integration that created the checkout session and any `affiliate_attribution` the agent attached: provider, publisher ID, campaign ID and token. See the [ACP repository](https://github.com/agentic-commerce-protocol/agentic-commerce-protocol) for the current spec, which is still labeled beta.

Store these as raw fields. A reasonable shape:

```json
{
  "event": "purchase",
  "event_id": "order_20931",
  "value": 84.00,
  "currency": "USD",
  "agent": {
    "path": "agent_checkout",
    "protocol": "ucp",
    "protocol_version": "2026-08-25",
    "platform_profile": "https://platform.example/profile",
    "attribution_raw": { "utm_source": "example", "gclid": null }
  }
}
```

The values above are placeholders. Do not normalize or drop unknown keys at collection time.

## Step 3: Verify agent browsing at the edge

Some agents load your pages in a real browser. OpenAI's cloud browser, for example, signs requests using [HTTP Message Signatures (RFC 9421)](https://www.rfc-editor.org/rfc/rfc9421). Each request carries `Signature`, `Signature-Input` and `Signature-Agent: "https://chatgpt.com"`, and the public keys are published at `https://chatgpt.com/.well-known/http-message-signatures-directory`, as described in [OpenAI's allowlisting guide](https://help.openai.com/en/articles/11845367-chatgpt-works-cloud-browser-allowlisting). Some CDNs verify these signatures for you.

Verify the signature before trusting the header, because anyone can send a header. Then pass a verified flag to your analytics pipeline, for example as a request attribute your server-side collector reads. The IETF [Web Bot Auth working group](https://datatracker.ietf.org/wg/webbotauth/about/) is standardizing this approach, so expect more agents to sign over time.

Unsigned agents that use a normal browser look like people. Behavioral detection can estimate them, but treat the result as an estimate.

## Step 4: Classify each conversion

Apply one rule order, in your warehouse or reporting layer, so every order lands in exactly one path:

1. If the order has protocol fields, classify it as **agent checkout** and use the protocol's attribution payload as the source.
2. Else, if the converting session was a verified signed agent, classify it as **agent browsing**.
3. Else, if the session's first touch has an AI referrer or an AI `utm_source`, classify it as **AI referred**.
4. Otherwise, use your normal channel rules.

Keep the raw inputs next to the result. When a new agent ships or a spec changes, you rerun the rule over history instead of losing it.

Report the three paths side by side rather than as one AI number. Referred visits behave like a traffic channel, agent browsing behaves like assisted shopping, and agent checkout behaves like a new sales channel with its own refund and fulfillment patterns.

## Step 5: Send agent orders to ad platforms server-side

Ad platforms bid on the conversions they receive. If an agent order is never sent, the campaign that created the demand gets no credit and automated bidding moves budget away from it.

Send agent orders through the conversion APIs, with the same `event_id` you use everywhere else. Agent orders rarely carry a click ID, so matching depends on hashed customer data such as email and phone on the order, and on the consent you hold for that customer. Do not send data for people who declined. Server-side delivery changes how an event travels, not what a person agreed to.

For ChatGPT Ads specifically, conversions go to OpenAI through its Pixel or Conversions API. Our [ChatGPT Ads measurement guide](https://usehardal.com/blog/how-to-measure-chatgpt-ads) covers `oppref` and deduplication.

## Step 6: QA before you report

- Place a test order through each path you support and confirm it appears once, with the right classification.
- Check that refunds and cancellations reduce the agent revenue you report.
- Compare agent orders in your warehouse with what each ad platform received, by day and time zone.
- Sample a handful of verified agent sessions and confirm the flag survives into your analytics.

## What stays out of reach

You will not see the prompt or the products the agent rejected. When a platform leaves protocol attribution empty, no tool can recover it without modeling. And research in an assistant followed by a purchase days later on another device still arrives as direct.

Hardal is the first-party data and agentic analytics platform. We collect orders from your backend, keep raw agent fields on each event, separate agent traffic from human sessions in [Hardal AI Visibility](https://usehardal.com/ai-visibility), and route conversions to ad platforms server-side. [Book a demo](https://usehardal.com/contact/demo) to map your agent paths.
