> 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 %}
