Kargo
Datafly Signal delivers conversion events to Kargo server-to-server using the Kargo S2S conversion pixel. This closes the attribution loop for mobile and CTV ad campaigns without relying on client-side pixel fires.
This integration is alpha. Kargo does not publish a fully documented public Conversions API. The blueprint targets the publicly-referenced S2S conversion pixel at krxd.net/data/c; the exact endpoint shape, accepted fields, and authentication mechanism vary between accounts. Customers should coordinate with their Kargo account manager to confirm the endpoint, obtain an auth_token, and validate the payload shape before going to production.
Prerequisites
Before configuring Kargo in Signal you need:
- An active Kargo advertiser account.
- Your Kargo
advertiser_idand thecampaign_idfor the campaign(s) you want to attribute. - An
auth_tokenissued by your Kargo account manager that authorises server-side conversion writes against the advertiser. - Confirmation from Kargo that the S2S conversion endpoint is enabled for your account.
Step 1: Request S2S Conversion Access
Reach out to your Kargo account manager and ask them to:
- Confirm S2S conversion delivery is enabled for the advertiser.
- Issue an
auth_tokenscoped to youradvertiser_id. - Share the expected payload shape for your campaign type (mobile, CTV, or both).
Kargo does not currently expose this through a self-service portal.
Step 2: Capture the kgid Click ID
Kargo attributes conversions back to ad impressions via the kgid click ID, which is appended to landing-page URLs when a user clicks through from a Kargo ad. Signal automatically reads kgid from the URL query string and persists it for downstream conversion events. No additional configuration is required as long as your landing pages preserve the kgid query parameter.
Configure in Signal
Configuration Fields
| Field | Required | Description |
|---|---|---|
advertiser_id | Yes | Your Kargo advertiser ID. |
campaign_id | No | Default campaign ID. Can be omitted if you carry it per-event via the kgid click ID. |
auth_token | Yes | Auth token issued by Kargo for S2S conversion writes. Treat as a secret. |
Management UI Setup
- Go to Integrations > Add Integration > Kargo.
- Choose the Retail preset (purchases + engagement).
- Enter your
advertiser_id,campaign_id, andauth_token. - Select consent categories —
marketingis the default. - Click Save.
Management API Setup
curl -X POST http://localhost:8084/v1/admin/integrations \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"source_id": "src_abc123",
"vendor": "kargo",
"name": "Kargo Production",
"enabled": true,
"config": {
"advertiser_id": "kg_adv_12345",
"campaign_id": "kg_camp_67890",
"auth_token": "kg_token_secret_abc123"
},
"consent_categories": ["marketing"]
}'API Endpoint
POST https://krxd.net/data/c?advertiser_id={advertiser_id}&campaign_id={campaign_id}&auth_token={auth_token}Authentication and routing are carried as query-string parameters. The body is a JSON object with the conversion details.
If your Kargo account uses a different endpoint or auth scheme (some accounts use header-based tokens), please share that with your Datafly contact — the blueprint can be adjusted to match.
Identity Signals
| Signal | Field | Description |
|---|---|---|
external_id | top-level | Datafly anonymous_id — stable cross-session identifier. |
kgid | top-level | Kargo click ID captured from URL query parameters. The primary attribution key. |
ip | top-level | Visitor IP forwarded from the original browser request. |
user_agent | top-level | Visitor User-Agent forwarded from the original browser request. |
Event Mapping
Retail preset
| Signal event | Kargo event |
|---|---|
Order Completed | conversion |
Product Viewed | engagement |
To customise, edit the integration’s Field Mappings in the Management UI.
Example: Purchase Event
Datafly.js call:
datafly.track("Order Completed", {
order_id: "ORD-001",
revenue: 129.99,
currency: "USD"
});Kargo payload sent by Signal:
{
"event": "conversion",
"external_id": "anon_abc123def456",
"kgid": "kg_click_xyz789",
"ip": "203.0.113.50",
"user_agent": "Mozilla/5.0 ...",
"order_id": "ORD-001",
"value": 129.99,
"currency": "USD"
}Testing Your Integration
- Configure the integration in a non-production source first.
- Trigger an ad-driven conversion path: click a Kargo creative with a
kgidURL parameter, complete the conversion event, and confirm Signal forwards the event. - Ask your Kargo rep to verify the conversion was received and attributed against the right campaign.
- Once verified end-to-end, promote the configuration to production.
Troubleshooting
| Problem | Solution |
|---|---|
| 401 / 403 responses | The auth_token is invalid or scoped to a different advertiser. Re-issue via your Kargo rep. |
| Conversions arriving but not attributed | The kgid click ID is missing or being stripped at the landing page. Confirm kgid is preserved in URL parameters end-to-end. |
400 Bad Request | The payload shape differs from what your Kargo account expects. Capture a request from Signal’s preview tool and share it with your Kargo rep to align the field names. |
Rate Limits
Kargo does not publish a public rate-limit number for the S2S conversion pixel. Conversion volume is typically well below any practical limit; Signal will retry on 429 / 5xx with exponential backoff.