# How to Test GPC Integration

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

### Introduction

Global Privacy Control (GPC) allows visitors to set their privacy preferences once through their browsers or devices and automatically notify online businesses of these preferences. GPC is required under the California Consumer Protection Act (CCPA).

<figure><img src="/files/AcY8PidqG0IjQNe6zKQD" alt=""><figcaption><p>GPC Feature</p></figcaption></figure>

### How to Test GPC Customer View / Storefront

To test Global Privacy Control (GPC), you'll need a browser or extension that supports GPC. Here’s how you can get started:

#### **1. Choose a Browser or Extension:**

* **Browser:** Use BRAVE. Remember to turn off "Shield" on the website so the banner can be shown.
* **Extension:** Try the [GPC Enabler](https://chromewebstore.google.com/detail/gpc-enabler/ilknagnpcicckgohjailfooamibaolnj) for Chrome.

#### **2. Enable GPC:**

* Turn on the GPC signal in your chosen browser or extension.
* To confirm the signal is being passed, open the Storefront, then Developer Tools (F12) > Console, and enter:

```javascript
navigator.globalPrivacyControl
```

* The value should read **true**.

#### **3. Disable GPC:**

* Turn off the GPC signal in your chosen browser or extension.
* Clear your Cookies and Cache and refresh the page.
* Open the Storefront, then Developer Tools (F12) > Console, and enter:

```javascript
navigator.globalPrivacyControl
```

* The value should now read **false** or undefined.

### How to Test GPC Integration

To ensure GPC integration is working with Avada Cookie Consent, follow these steps:

#### **1. Turn on GPC Integration in Avada Cookie Consent:**

If a customer in a “Data sales opt-out” region sends the [GPC](https://globalprivacycontrol.org/) signal, the following will occur:

* `sale_of_data` will be set to `false` automatically, while declining other cookie types.
* To verify, open the Storefront, then Developer Tools (F12) > Console, and enter:

```javascript
window.Shopify.customerPrivacy.currentVisitorConsent();
```

* The output should be:

```javascript
{marketing: 'no', analytics: 'no', preferences: 'no', sale_of_data: 'no', gpc: ''}
```

#### **2. Cookie Banner Behavior:**

* The cookie banner will not be shown initially. However, visitors can reopen the banner if the reopen feature is enabled.
* Regardless of how the visitor interacts with the banner, consent will be set to `sale_of_data = false`, allowing only necessary cookies.

Feel free to reach out if you need any assistance or have any questions! Happy testing!


---

# 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://docs.avada.io/cookie-help-center/integrations/how-to-test-gpc-integration.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.
