Delivr.ai Cookie Specification
Data flows between Delivr and the partner, facilitated by on-page code (often an image pixel) that transmits various pieces of information. This data can include third-party identifiers like cookies or universal IDs, as well as consent strings and privacy codes. A cookie sync can be set up from either end, and either party can manage the mapping.
The document outlines a process for synchronizing cookies using a GET request to the Delivr API. Here's a breakdown of the key components and steps involved:
API Endpoint
URL: https://api.sitelytics.tech/pixel/core/api/sync
Parameters
client_id: Partner ID provided by Delivr.
client_uid: User ID from the partner's system (your cookie).
sha256_hem: Optionally, the user's hashed email.
ip: Optionally, the user's IP address.
ref: Optionally, the referrer page URL, URL-encoded.
headers: Optionally, request headers in JSON format.
params: Optionally, additional parameters for better resolution (e.g., buyer ID).
gdpr: Optionally, a GDPR consent string if applicable.
gpp: Optionally, a GPP consent string as per the IAB specification.
redir: Optionally, a URL-encoded redirect URL. Supports placeholders like $DLVRCOOKIE, $DLVRHEM, $REF, and $EVENTTIME.
Implementation Steps
Read Parameters:
Extract parameters from the query URL.
Use $REF from the request or the HTTP referrer if not set.
Cookie Handling:
Retrieve the existing Delivr cookie from the frontend.
Perform identity resolution using the value from Valkey, setting it as $DLVRHEM.
Redirection:
Decode the redir parameter to determine the target URL.
Replace placeholders in the URL with actual values (e.g., $DLVRHEM with the resolved value).
Redirect the user to the constructed URL.
This process allows for seamless integration and synchronization of user data across systems while respecting privacy regulations.
https://api-staging.delivr.ai/pixel/core/api/sync?
client_id= - PartnerID (get it from us)
client_uid= - User ID in Partner system (your cookie)
sha256_hem = - user hashed email (optional)
ip = - user IP (optional)
ref = - ref page urlencoded (optional)
headers - headers of the request (json format - optional)
params - add anything you need for us to do a better resolution (like buyer id or whatever) (optional)
gdpr = (optional if no gdpr, otherwise consent encoded string - daisybit)
gpp = (optional if no gpp applicable otherwise according to https://github.com/InteractiveAdvertisingBureau/Global-Privacy-Platform/blob/main/Core/Consent%20String%20Specification.md)
redir = urlencoded redirect URL( use $DLVRCOOKIE to add our cookie and $DLVRHEM to add our hem to the request $REF to add ref sent to us or Referring page $EVENTTIME - event time) - optional. Once set will redirect to the encoded URL populating the values
(this is about our implementation)
^^ That what they will send to us
GET https://api-staging.delivr.api/pixel/core/api/sync
So they will encode into the query URL all the parameters.
SO, overall:
1. Read what they have sent to use (Get $REF from them or if not set from Referrer) ($REF or $Referrer)
2. Find our cookie and make redirect
2.1 Our cookie => take it from frontend (it has been set already - it is our resolution)
2.2 Make resolution (get Value from Valkey) put it as $DLVRHEM
2.3 Redirect => make url decode (they send to use where we have to redirect (redir))
redir (decoded) = https://chort.com/blablabla/pixel?hem=$DLVRHEM (and you need to replace with real value)
(this is about our implementation End)
https://api-staging.delivr.ai/pixel/core/api/sync?client_id=12345&client_uid=4534343443&redir=