> For the complete documentation index, see [llms.txt](https://docs.targetpick.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.targetpick.io/targetpick_eng/cookie-sync.md).

# Cookie Sync

## Cookie Matching for Sharing Audience Identifier Information (Cookie sync, Cookie matching, ID Pairing) <a href="#cookie-cookie-sync-cookie-matching-id-pairing" id="cookie-cookie-sync-cookie-matching-id-pairing"></a>

{% hint style="info" %}
This guide is written for cookie-based ID matching to identify audiences between CJ MezzoMedia DSP and SSP.
{% endhint %}

This guide does not need to be applied to Native app-based SDK-integrated media that use OS-based ad identifiers such as ADID and IDFA, and it applies to web-based media.

The ultimate purpose of cookie matching is to identify decentralized web-based audiences through cookies and thereby improve ad efficiency.

### Cookie Matching Overview

<figure><img src="/files/fXubAwRWGU3YGSr3PJFf" alt=""><figcaption></figcaption></figure>

1. When a user accesses an ad placement through a web browser, the DSP’s cookie creation tag is called. This occurs when the user has previously visited another partner media site or when a CJ MezzoMedia DSP ad is displayed.<br>
2. DSP checks whether cookie matching exists with the SSP/ADX/AD Network, and if cookie information is not matched, it calls the cookie creation domain of the SSP/ADX/AD Network and passes the SID. \
   \
   At this time, the SID is passed through a specified parameter, and the SSP/ADX/AD Network that receives the SID stores a cookie containing the SID in the user’s browser. \
   (SID is an identifier issued by CJ MezzoMedia DSP.) \
   \
   The URL structure is shown below (SID is an example issued by CJ MezzoMedia). \ <img src="/files/hPtL3vkBL9NS223lQbAg" alt="" data-size="original">\
   \
   SID is represented by 32 hexadecimal characters and is separated by hyphens into five groups in the 8-4-4-4-12 format, for a total of 36 characters (32 characters and 4 hyphens). \
   (It has the same structure as ADID/IDFA.)<br>
3. When the same user accesses a partner media page through the same browser, the SSP/ADX/AD Network reads the previously issued SID.<br>
4. When making an ad request, if you insert the SID into the user.buyeruid object and send the request, the DSP uses the received SID to identify the audience and deliver the appropriate ad.<br>

For cookie matching, the cookie creation URL of the SSP/ADX/AD Network is required.

Please store the SID delivered by CJ MezzoMedia DSP in the cookie created under the SSP/ADX/AD Network domain, and when making an ad request to the DSP, read the SID stored in the cookie (getCookie) and pass it along to complete the matching.

{% hint style="info" %} <mark style="color:red;">**\[Note]**</mark> Cookies created in each browser are not compatible with one another, so if multiple browsers are used, a separate cookie ID is created for each. Cookie matching in a webview included in a hybrid app is not compatible with other browsers and is only used within that app, so SDK usage is recommended.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.targetpick.io/targetpick_eng/cookie-sync.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
