WPConsent Documentation

Documentation, Reference Materials, and Tutorials for WPConsent

Global Privacy Control (GPC)

Want to automatically honor browser-level privacy preferences from your visitors? WPConsent detects Global Privacy Control signals and declines non-essential cookies without any user interaction. This guide walks you through enabling and customizing Global Privacy Control support in WPConsent.

Table of contents

Prerequisites

Before you begin, make sure you have:

  • WPConsent installed and activated
  • A banner configured with at least 1 non-essential cookie category
  • Basic familiarity with WPConsent settings

Enabling GPC support

  1. Head over to WPConsent >> Settings in your WordPress admin.
  2. Then, click the Advanced tab.
  3. Find the Respect Global Privacy Controls toggle and turn it on.
  4. Click Save Changes.

The Respect Global Privacy Controls toggle in the Advanced settings tab

Once enabled, WPConsent checks the navigator.globalPrivacyControl browser signal on every page load. If a visitor’s browser sends a GPC signal, WPConsent automatically declines all non-essential cookie categories. The visitor won’t see the consent banner at all.

Customizing the toast notification

When WPConsent honors a GPC signal, it displays a brief toast notification to let the visitor know their preference was respected.

  1. Head over to WPConsent >> Banner Design.
  2. Then, click the Content tab.
  3. Scroll down to find the GPC Honored Message field. This field only appears when GPC support is enabled.
  4. Enter your preferred message. The default text is “GPC Signal Honored.”
  5. Click Save Changes.

The GPC Honored Message and GPC Override Message fields in the Banner Content tab

The toast appears at the bottom of the page for 10 seconds and includes a close button. Visitors can dismiss it early by clicking the close button.

Configuring the override message

If a visitor with an active GPC signal opens the preference panel and tries to enable a non-essential category, WPConsent requires them to acknowledge an override message first.

  1. On the same Content tab under WPConsent >> Banner Design, find the GPC Override Message field.
  2. Enter the text visitors must acknowledge. The default message is: “I understand GPC will be overwritten and want to allow this site to sell or share my personal information anyway.”
  3. Click Save Changes.

When a visitor with GPC honored tries to change their preferences, WPConsent displays this message with a toggle. The visitor must turn on the toggle before they can save new preferences. This ensures they understand they’re overriding their browser-level privacy setting.

Understanding how GPC works

Automatic preference setting

Here’s what happens when a visitor with GPC enabled lands on your site:

  1. WPConsent checks if navigator.globalPrivacyControl is true in the browser.
  2. If no existing respect_gpc flag exists in the visitor’s preference cookie, WPConsent creates a new preference.
  3. All non-essential categories are set to declined. The essential category stays enabled (it’s always required).
  4. WPConsent stores a respect_gpc flag in the preference cookie.
  5. The toast notification displays if enabled.
  6. The consent banner stays hidden.

Override protection

If a visitor with GPC honored opens the preference panel and tries to enable a category:

  1. WPConsent detects the preference change conflicts with GPC.
  2. The save action is blocked.
  3. A toggle with your override message appears.
  4. The visitor must turn on the toggle to acknowledge they’re overriding GPC.
  5. Once acknowledged, preferences save and respect_gpc is set to false.
  6. Future visits respect the manual preference instead of GPC.

What happens after GPC is honored

After GPC is honored, WPConsent treats the visitor as if they rejected all non-essential categories. This means scripts assigned to blocked categories won’t execute, and content blocking placeholders display where applicable. This behavior continues until the visitor manually overrides GPC through the preference panel.

Verifying your setup

Testing with GPC enabled

  1. First, enable GPC in your browser. It’s available natively in Brave (under Settings >> Shields >> Global Privacy Control) or via browser extensions for Firefox and Chrome.
  2. Open your site in a private or incognito window.
  3. Confirm the toast notification appears with your configured message.
  4. Verify that non-essential scripts aren’t loading (check the Network tab in browser DevTools).
  5. Open the preference panel and try to enable a non-essential category.
  6. Confirm the override toggle appears and that you can’t save without acknowledging it.

The GPC toast notification displayed to a visitor on the frontend

Testing without GPC

Visit your site in a browser without GPC enabled. You should see the normal consent banner with no GPC-related messages or toast notifications.

Customizing GPC with filters

Adjusting toast duration

Use the wpconsent_gpc_toast_duration filter to change how long the toast displays. The value is in milliseconds:

add_filter( 'wpconsent_gpc_toast_duration', function() {
    return 5000; // 5 seconds instead of 10.
} );

Disabling the toast notification

Use the wpconsent_gpc_toast_enabled filter to hide the toast entirely:

add_filter( 'wpconsent_gpc_toast_enabled', '__return_false' );

Visitors with GPC still have their preferences automatically set. They just won’t see the notification.

FAQ

Why don’t I see the toast notification?

The toast only appears for visitors with GPC enabled in their browser. To test it, enable GPC in Brave, or install a GPC browser extension for Firefox or Chrome. Also make sure the wpconsent_gpc_toast_enabled filter isn’t set to false in your theme or a custom plugin.

Why doesn’t the override toggle appear in the preference panel?

The override toggle only shows when 3 conditions are met: the visitor has GPC enabled in their browser, GPC was previously honored (the preference cookie contains respect_gpc: true), and the visitor opens the preference panel. If you see the toggle when GPC isn’t active, clear your site cookies and test again.

Why are non-essential scripts still loading even though GPC is enabled?

There are a few things to check:

  • Confirm that script blocking is enabled in WPConsent >> Settings.
  • Make sure the GPC toggle is enabled in WPConsent >> Settings >> Advanced.

Can I use GPC support with the free version?

Yes. GPC support is available in both the free and paid versions of WPConsent.

Conclusion

You now have Global Privacy Control support configured in WPConsent. Your site automatically honors browser-level GPC signals, declines non-essential cookies for those visitors, and protects against accidental overrides. To learn more about other settings on the Advanced tab, check out the advanced settings guide.

Was this article helpful?

Related Articles