How to Test GPC Integration

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).

GPC Feature

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 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:

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:

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:

If a customer in a “Data sales opt-out” region sends the GPC 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:

window.Shopify.customerPrivacy.currentVisitorConsent();
  • The output should be:

{marketing: 'no', analytics: 'no', preferences: 'no', sale_of_data: 'no', gpc: ''}
  • 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!

Last updated