# Privacy & Consent

The Nexx360 Instream Player supports GDPR/TCF v2 and US Privacy (CCPA) consent signals. When provided, these values are included in the OpenRTB bid request sent to the auction endpoint.

## GDPR / TCF v2

Pass the GDPR flag and the TCF v2 consent string via the `init()` configuration:

```javascript
nexx360InstreamPlayer.init({
  tagId: 'your-tag-id',
  container: 'video-ad',
  gdpr: '1',
  gdprConsent: 'CPceAEAPceAEAAHABBENCgCsAP_AAH_AAAAAIhtf_X__b3...'
});
```

| Property    | Type     | Description                         |
| ----------- | -------- | ----------------------------------- |
| gdpr        | `string` | `'1'` if GDPR applies, `'0'` if not |
| gdprConsent | `string` | TCF v2 consent string from your CMP |

### How It Flows into the Bid Request

When `gdpr` is `'1'` and `gdprConsent` is provided, the library sets:

```json
{
  "regs": {
    "ext": {
      "gdpr": 1
    }
  },
  "user": {
    "ext": {
      "consent": "CPceAEAPceAEAAHABBENCgCsAP_AAH_AAAAAIhtf_X__b3..."
    }
  }
}
```

{% hint style="info" %}
If `gdpr` is not `'1'` or `gdprConsent` is not provided, the `user.ext.consent` field is omitted from the bid request.
{% endhint %}

## US Privacy (CCPA)

Pass the US Privacy string via the `init()` configuration:

```javascript
nexx360InstreamPlayer.init({
  tagId: 'your-tag-id',
  container: 'video-ad',
  usPrivacy: '1YNN'
});
```

| Property  | Type     | Description                       |
| --------- | -------- | --------------------------------- |
| usPrivacy | `string` | US Privacy string (e.g. `'1YNN'`) |

### How It Flows into the Bid Request

When `usPrivacy` is provided, the library sets:

```json
{
  "regs": {
    "ext": {
      "us_privacy": "1YNN"
    }
  }
}
```

## Combined Example

Both GDPR and US Privacy can be passed together:

```javascript
nexx360InstreamPlayer.init({
  tagId: 'your-tag-id',
  container: 'video-ad',
  gdpr: '1',
  gdprConsent: 'CPceAEAPceAEAAHABBENCgCsAP_AAH_AAAAAIhtf_X__b3...',
  usPrivacy: '1YNN'
});
```

This produces the following in the bid request:

```json
{
  "regs": {
    "ext": {
      "gdpr": 1,
      "us_privacy": "1YNN"
    }
  },
  "user": {
    "ext": {
      "consent": "CPceAEAPceAEAAHABBENCgCsAP_AAH_AAAAAIhtf_X__b3..."
    }
  }
}
```


---

# Agent Instructions: 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:

```
GET https://developer.nexx360.io/integration-methods/instream-player/privacy-consent.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
