How do I cookie sync with Narrative?

Often time browser-based identifiers are stored in domain-specific cookies. For domains to cross-reference those identifiers, a "cookie sync" needs to be established.

Overview

Cookies are used to create a semi-persistent identifier for a particular computer's browser. Web browsers enforce a rule that a cookie that is set by a domain (ex: example.com) can only be read within that same domain. This rule means that different companies typically have different cookie-based identifiers.

To share identifiers that live in their own namespaces, we leverage cookie syncing, by passing the IDs as query parameters to create a shared understanding.

Currently, Narrative only supports partners initiating the sync with us. 

Partner Initiated Syncs

For partners who are initiating the sync with Narrative the following endpoint and query parameters can be used:

Endpoint

//io.narrative.io/?

Query Parameters

Parameter Description
companyId (Required) A unique ID assigned to the partner by Narrative
id (Required) Type and Value of the identifier formatted as partner_id_type:partner_id_value. For cookies, the partner_id_type will be assigned to the partner by Narrative
red (Optional) If the partner would like Narrative to redirect back to the partner with the Narrative ID a properly encoded URL can be used

Example

BrandA would like to initiate a cookie sync with Narrative. 

  • companyID: 789 
  • customerID is [123456789]

Pixel before: io.narrative.io/?companyId=XXX&id=customer_id:[[XXX]]

Pixel after: io.narrative.io/?companyId=789&id=brandA_id:[[123456789]]