# US State Privacy (GPP)

Source: https://docs.ezoic.com/docs/privacy/gpp/


## Overview

In addition to GDPR support, the Ezoic CMP handles US state privacy laws (such as the California CCPA/CPRA) using the IAB [Global Privacy Platform (GPP)](https://iabtechlab.com/gpp/).

When a visitor is located in a US state where a privacy law applies, the CMP automatically:

- Provides the IAB GPP API (`window.__gpp`) on the page
- Displays a consent banner with **Consent** and **Do Not Sell My Information** options
- Stores the visitor's choice and passes it to advertising partners via the GPP consent string

This works out of the box with the standard CMP installation described in [GDPR Compliance](/docs/privacy/gdpr/) — no additional configuration is required.

## Replace the banner with your own link

Add a visible link with the class `ez-do-not-sell`, usually in the footer next to your privacy policy:

```html
<a href="/privacy">Privacy Policy</a>
<a href="#ez-do-not-sell" class="ez-do-not-sell">Do Not Sell My Information</a>
```

The class is required. You can change the link text. "Do Not Sell or Share My Personal Information" is also fine.

When that element is visible on the page:

- The Privacy Preferences banner is not shown.
- Clicking the link opens the same opt-out dialog as the banner's **Do Not Sell My Information** button.

If the page has no visible element with that class, the banner is shown as usual. A hidden or zero-size link does not replace the banner, and neither does a link sitting fully left or right of the viewport. A footer link below the fold still counts as visible.

## Suppressing the banner yourself


__Warning:__ Use this only when you need to open the opt-out dialog from your own JavaScript. If you hide the banner, visitors still need a working way to opt out. A visible `ez-do-not-sell` link above is enough on its own and does not need this attribute.


To hide the banner without using the `ez-do-not-sell` class, add `data-ez-gpp-suppress-banner="true"` to the CMP script tag:

```html
<script data-cfasync="false" data-ez-gpp-suppress-banner="true" src="https://cmp.gatekeeperconsent.com/min.js"></script>
<script data-cfasync="false" src="https://the.gatekeeperconsent.com/cmp.min.js"></script>
```

The GPP API (`window.__gpp`) is still provided and stored choices are still honored. Open the same dialog from your own link by calling `window.ezGPPOpenModal()`:

```html
<a href="#" onclick="window.ezGPPOpenModal(); return false;">Do Not Sell or Share My Personal Information</a>
```

## Showing the link only where required

The CMP sets `window.ezGPPEnabled = true` when the visitor is in a jurisdiction where a US state privacy law applies. If you only want to render the link for those visitors, check this flag and put `ez-do-not-sell` on the element you add. A link that becomes visible after the banner has already appeared removes the banner.

```js
if (window.ezGPPEnabled === true) {
    // Render your "Do Not Sell or Share My Personal Information" link
}
```

Because the CMP script loads asynchronously, run this check after the page has finished loading (for example, in a `window` `load` event handler) rather than immediately when your own script is parsed.

