Skip to content
Developer docs Sales (conversions)

Sales from tracked links

Tell CommentGate about a sale that came from a tracked link, so the revenue shows next to the comment, lead and campaign that led to it. Stores usually send this from an order webhook or through Zapier or Make.

Updated September 26, 2026

Record a sale

POST/api/v1/conversions

Every link CommentGate sends in a private message is a tracked link. When someone opens it, CommentGate adds cg_click=<click id> to your destination URL. Keep that value with the order (most stores can save landing page parameters), then report the sale here, so the revenue shows next to the comment, lead and campaign that led to it.

When the workspace connected Meta Events Manager (Settings, Integrations), the sale is also sent to their dataset as a website Purchase. The Meta fields below make that work and improve matching; they are not stored.

Who can call it: Any API key.

Body

click_id string · up to 200 characters· required
The cg_click value from the landing page URL.
value number or numeric string· required
The order value in the currency's major unit (dollars, not cents). A number, or a numeric string such as "129.50".
currency string
Three-letter ISO 4217 code.
occurred_at datetime
When the sale happened, ISO 8601 with an offset. Default: now.
order_id string · up to 200 characters
Meta only. Your order id, used as the event id so it deduplicates with the Meta Pixel's Purchase for the same order.
client_user_agent string · up to 1,000 characters
Meta only. The buyer's browser user agent. Meta requires it for website sales: without it the sale is not sent. Zapier and Make call it Buyer browser (user agent).
client_ip_address string · up to 64 characters
Meta only. The buyer's IP address (IPv4 or IPv6), not hashed.
event_source_url string · up to 2,000 characters
Meta only. The page where they bought. Default: the tracked link's destination.
email string · up to 254 characters
Meta only. The buyer's email, hashed before sending.
phone string · up to 40 characters
Meta only. The buyer's phone, hashed before sending.
fbc string · up to 500 characters
Meta only. The _fbc cookie, when your store has it.
fbp string · up to 500 characters
Meta only. The _fbp cookie, when your store has it.

Example

Request
curl -X POST https://commentgate.com/api/v1/conversions \
  -H "Authorization: Bearer $COMMENTGATE_API_KEY" \
  -H "content-type: application/json" \
  -d '{"click_id":"k7Qm2x.a1b2c3d4","value":129.5,"currency":"USD","occurred_at":"2026-09-22T19:04:00Z"}'

200 OK. Recorded. meta is there only when Meta Events Manager is connected: { "sent": true }, or { "sent": false, "reason": "..." } in words (for example no client_user_agent, or a sale older than 7 days).

200 OK response
{
  "data": {
    "click_id": "k7Qm2x.a1b2c3d4",
    "value": 129.5,
    "currency": "USD",
    "lead_id": "0b6f9e21-4c3d-4e5f-8a9b-1c2d3e4f5a6b",
    "campaign_id": "5c1d2e3f-6a7b-4c8d-9e0f-1a2b3c4d5e6f",
    "recorded": true,
    "meta": {
      "sent": true
    }
  }
}

Errors

HTTPCodeWhen
400invalid_requestA missing click_id, or a value that is not a number of 0 or more
401unauthorizedMissing, unknown or revoked key
404not_foundThe click id does not belong to this workspace

Safe to retry. One sale per click: reporting the same click_id again replaces its value and never adds to it, so the click id is the idempotency key. A lead's revenue is the sum over its clicks.

Also as record_sale (MCP), commentgate sales record.

In the help center

  • Send sales and leads to Meta

    Connect your Meta dataset so sales from your tracked links and emails people give you in DMs reach Events Manager, and your ads learn who buys.

  • Tracked links and recording sales

    Every link a campaign sends in a DM counts its clicks. Report the sales those clicks lead to, and the revenue shows on the campaign, the step and the lead.

  • Read the numbers on a campaign

    What Reached, Clicked and Converted mean on each step, what the campaign list totals count, and why some people got no message.