Cookie Synchronization

Prev Next

Browser-based applications rely on third-party cookies to be addressable by programmatic platforms, and  cookie synchronization allows Triton Digital to access such cookies. It is the responsibility of the requesting application to ensure the browser has called the cookie synchronization functions.

A script inserted into the player page calls a number of 1x1 GIF tags ("pixels") that are inserted into the browser pane containing the player. Each tag brings the browser to an advertising partner’s sync service that redirects immediately back to Triton Digital (i.e., returns a 302 Found HTTP response). In the redirect URL to Triton Digital, the partner inserts the user ID it assigned to the browser making the call. Triton Digital then returns a pixel (transparent 1x1 GIF) and writes a Triton cookie containing the partner’s user ID.

Since the partner’s user ID is now revealed to the Triton Ad Platform, it can send ad requests with that user ID, enabling targeted advertising from the partner’s ad service.

Integrating Cookie Synchronization into the Player

Cookie synchronization pixels are wrapped into a JavaScript that must be on the same page or window (or “pane”) as the player. If you use a pop-out player, the script must be on the pop-out pane, not on the originating browser page.

To load the cookie synchronization script, insert the following HTML tag into the player window:


<script type="text/javascript" src="https://playerservices.live.streamtheworld.com/api/idsync.js?stationId=<placementID>[&gdpr=<gdpr flag>&gdpr_consent=<TC string>&us_privacy=<US privacy string>]">
</script>


Parameter
Description
Value

stationId

ID of the placement.

This parameter is required.

Integer value

gdpr

Flag indicating if General Data Protection Regulation (GDPR) regulations apply. GDPR was established by the European Parliament and the Council of the European Union.

= GDPR does not apply

= GDPR applies

gdpr_consent

GDPR transparency and consent string encapsulating relevant details about how transparency and consent was established. The string must comply with the IAB Transparency and Consent Framework specifications.

URL-safe base64-encoded GDPR consent string.

us_privacy

U.S. Privacy String that signals whether or not the U.S. Privacy Regulations apply to the consumer, if an “explicit notice” legal disclosure has been established with a consumer, and if the consumer has chosen to opt out of the sale of their personal data. Version 1 only supports signals pertaining to the California Consumer Privacy Act (CCPA). The string must comply with the U.S. Privacy String format.

String

In order for the cookie-sych to be effective immediately, (i.e., for a new listener) the script should be loaded before content is accessed and ads are requested.
If an Ad request or the call to Triton partnerIds service is done through XMLHttpRequest (XHR), the player must make sure the flag "withCredentials" is set to true. This flag allows cookies to be passed  with the XMLHttpRequest and be read by the service. Without this flag, cookies set by cookie synchronization cannot be read.

For more information on how to pass cookies with cross-site XML requests, refer to:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Requests_with_credentials