Conversion TrackingUpdated 2026-07-09 · 4 min read

Server-side conversions with CAPI Ingest

Send purchase, checkout and refund events server-side to Meta and verify every event landing.

If you send server-side conversions to Meta through the Conversions API (CAPI), you already know the frustration of checking whether events are actually flowing. Meta's own stats endpoint aggregates with a 24 to 48 hour delay, does not expose a per-day or per-hour time series through the public API, and skips low-volume pixels entirely. Hivenue's CAPI Ingest fixes this: your server sends a copy of each event to a Hivenue endpoint, and the Pixel page shows a real-time event chart, in the style of Meta Events Manager, updated within seconds.

Before you start

You need a server that already sends CAPI events to Meta (a Shopify server-side setup, a custom backend, or any CAPI gateway you control) and a Hivenue workspace with the Meta integration configured. This guide pairs naturally with the Tracking module, where the Pixel page and the event chart live.

Step 1: Generate an ingest token

Go to Settings, then Integrations, then Meta, then CAPI Ingest, and click "Create new token". Give it a descriptive label such as "Shopify EU server" or "Custom backend prod". Optionally, restrict the token to specific Pixel IDs; that is useful when you run several pixels and want one token per pixel.

The plaintext token is shown once. Copy it immediately. It looks like this:

wsci_AbCdEfGhIjKlMnOpQrStUvWxYz0123456789AbCdEfGhIjKlMnOpQrStUvWxYz0123

If you lose it, generate a new token and revoke the old one.

Step 2: Send Hivenue a copy of your events

Your server already POSTs events to Meta's Graph API. Add a second POST, in parallel and fire-and-forget, to the Hivenue ingest endpoint:

POST https://<your-hivenue-app-domain>/api/integrations/meta/capi-ingest
X-WS-Token: wsci_AbCdEfGhIj...
Content-Type: application/json

{
  "pixel_id": "<PIXEL_ID>",
  "data": [ ...the same events you send to Meta... ]
}

Each event in data follows the same shape as the Meta payload: event_name (required, up to 64 characters), event_time (required, Unix epoch seconds), event_id (optional but strongly recommended for deduplication), action_source (optional, defaults to "website"), custom_data, and user_data. A batch can carry up to 1000 events.

Privacy note: the endpoint accepts user_data (email, phone, IP used for Meta's server-side matching) but drops it immediately, before anything is written to the database. Hivenue keeps only event_name, event_time, action_source, event_id, the monetary value and currency from custom_data, and the key names (not the values) of custom_data for debugging. Raw personal data is never persisted.

Step 3: Verify it works

Send a test event with curl:

curl -X POST https://<your-hivenue-app-domain>/api/integrations/meta/capi-ingest \
  -H "X-WS-Token: wsci_..." \
  -H "Content-Type: application/json" \
  -d '{
    "pixel_id": "866511018834109",
    "data": [
      {
        "event_name": "TestEvent",
        "event_time": '"$(date +%s)"',
        "event_id": "manual-test-1",
        "action_source": "website",
        "custom_data": { "value": 1.0, "currency": "EUR" }
      }
    ]
  }'

The expected response:

{"ok":true,"received":1,"ingested":1,"deduped":0,"buckets":1}

The fields mean: received is how many events arrived in the batch, ingested how many were new and counted, deduped how many were seen before and skipped, and buckets how many distinct date, event name, and source combinations were touched. Reload the Pixel page in Hivenue and the event appears on today's chart within seconds, with a 7, 30, or 90 day window selector and one series per event type.

Error reference

CodeWhenFix
401Missing or invalid X-WS-TokenCheck the token; it is case-sensitive
403pixel_id not in the token's allow-listEdit the token or use a different one
400Malformed payloadCheck the details field in the response
429Rate limit hitBack off and retry, or split traffic across tokens
500Database write failedRetry with exponential backoff

Good to know

  • Deduplication. Always include a unique event_id (up to 128 characters). Hivenue keeps a dedupe ledger for 7 days: the same event_id sent twice within that window is silently skipped and counters stay correct, so retries on your side are safe.
  • Rate limit. 100,000 events per workspace per hour. Above that you get a 429; respond with exponential backoff (1s, 2s, 4s, 8s). If you legitimately need more, contact support.
  • Retention. Chart events are kept for 180 days, then removed by a daily cleanup. The dedupe ledger only spans 7 days.
  • Token revocation. If a token leaks (for example, committed to a public repo), open CAPI Ingest, revoke it, and every request with that token gets a 401 from that moment. Generate a fresh token and update your server config.

One extra POST from your server, and your pixel health stops being a 48-hour-old mystery. See the Tracking module for the rest of the first-party attribution picture.

See it live on your store.

Book a 15-minute demo. We will run the whole suite on your data, with our team.