Kargo Sync
What is Kargo?
Kargo is a digital advertising platform that helps brands and publishers run programmatic and direct-sold campaigns across premium inventory. It provides solutions for audience targeting, measurement, and optimization, supporting identity-driven advertising use cases.
Product Type: Advertising
Integration Type: Starter Kit & ID Sync
Capabilities
- Captures
puidby contacting Kargo’s sync endpoint and reading the user ID returned in the response. - Stores the identifier in first-party storage for a configurable duration to support downstream matching.
- Retries syncing after failures using a first-party failure marker to avoid repeated calls within the marker TTL.
- Adds the identifier to server-side events for audience matching and attribution use cases.
Considerations
- This sync requires coordination with Kargo to allow your domain in CORS settings for
crb.kargo.comand to return the required CORS headers for credentialed requests. - The sync includes GDPR-related query parameters when present.
Sync Details
- IDs:
puid– A Kargo-provided user identifier returned from the sync API and used for identity-based advertising workflows.
- Description:
- The sync calls Kargo’s Id endpoint via a
GETrequest and includes GDPR parameters when detected. - The sync extracts
puidfrom the JSON response body. - The value is stored in first-party storage for the duration defined by Cookie Lifetime (in days) (defaults to 365 days).
- Values refresh only after the stored value expires; if the fetch fails, a first-party failure marker is stored for ~1 day and the sync retries after the marker expires.
- The identifier is added to server-side event payloads for attribution or targeting.
- The sync calls Kargo’s Id endpoint via a
- Response Example:
{ "puid": "efaa6e95-8f9e-25bf-d0ec-6bbbcf92ce59" } - Server-side Event Payload: Server-side Event Payload: Upon completion of all vendor's sync, the server-side events will incorporate all resolved identifiers as described above. The following object will be appended to the context.providers property within the event's JSON payload.
{
"kargo": {
"puid": String
}
}
- Cookie Name:
- Cookie:
_meta_kargo_puid, _meta_kargo_puid_failure - IndexedDB:
[your storage prefix]_kargo_puid, [your storage prefix]_kargo_puid_failure - For a general guide on ID Sync validation, see here.
- Cookie:
Sync Setup Guide
1. Gather Credentials
This sync does not require an API key, but it does require CORS allowlisting managed by Kargo. Contact Kargo support and request the following for crb.kargo.com:
- Add your domain to the allowed origins list for Kargo’s CORS configuration.
- Return the required headers for credentialed CORS requests:
Access-Control-Allow-Credentials: trueAccess-Control-Allow-Origin: <your-domain>
2. Add a Kargo Sync in MetaRouter
To gather the puid, you must add a Kargo sync.
- From the Pipelines page, find the pipeline associated with the web property you’d like to add a sync to. Hover over the three dot dropdown and select “Build AJS File.”
- In the Identity Syncs section, select the Kargo sync.
- Fill out the following fields:
- Cookie Lifetime (in days) – How long a synced identifier remains in first-party storage. When expired or no longer detected, the sync will re-trigger. Example:
365 - API Timeout (in milliseconds) – Maximum time the Sync Injector waits for a response from the vendor's API. Example:
5000
- Cookie Lifetime (in days) – How long a synced identifier remains in first-party storage. When expired or no longer detected, the sync will re-trigger. Example:
- Scroll down and click the Save and Build File button.
- Deploy your AJS file to propagate changes to your web property.
Updated about 5 hours ago