Back to the help center

Integrations

WordPress Plugin Setup

Step-by-step guide to installing our WordPress plugin

The GetCookies WordPress plugin loads the consent banner in the page head with your Domain ID and holds back known tracking scripts until the visitor consents. Banner text, design, categories and languages are managed in your GetCookies dashboard, not in WordPress.

Install the plugin

The plugin is not listed in the WordPress.org plugin directory. Download it from your GetCookies dashboard instead.

  1. In the GetCookies dashboard, open your domain and go to Integrations.
  2. Click Download Plugin under WordPress. Your Domain ID is already filled in inside the ZIP.
  3. In WordPress, go to Plugins > Add New > Upload Plugin, choose the ZIP and click Install Now.
  4. Click Activate Plugin.

Requirements: WordPress 6.3 or later and PHP 7.4 or later.

Plugin settings

Open Settings > GetCookies in WordPress admin.

SettingWhat it does
Domain IDConnects the site to your GetCookies domain. Filled in when you download the plugin from the dashboard. Check Domain ID confirms it before you save.
Hold back trackersOn by default. Known trackers wait until the visitor consents to the matching category.
Google tagsOff: Google Analytics, Google Ads and Tag Manager wait for consent. On: they load straight away in Google Consent Mode and send cookieless pings until the visitor agrees.
Google Tag ManagerOptional. Adds your container right after the GetCookies loader. Leave it empty if Tag Manager is already on your site.
WooCommerce checkout checkboxOff on new installs. Adds an unticked marketing-consent checkbox to the classic WooCommerce checkout.

The banner's design, text and languages come from Widget Configuration in the GetCookies dashboard.

What gets held back

Known trackers wait for consent wherever they are added:

  • Scripts loaded through WordPress by plugins and themes (wp_enqueue_script): the plugin marks them before the page is sent.
  • Code pasted straight into theme files or a "header scripts" box, and tags added by Google Tag Manager: the GetCookies loader, which the plugin prints as the first script in <head>, holds them back in the browser. This uses Automatic tracker blocking in your GetCookies dashboard (Widget Configuration > Design > Accessibility > Script Blocking), on by default for new sites; see Automatic tracker blocking for the full vendor list.

Scripts GetCookies does not recognise need one attribute so they wait for consent:

html
<script type="text/plain" data-cookieconsent="marketing" src="https://example.com/pixel.js"></script>

Shortcode

[getcookie_preferences]

Adds a "Cookie Preferences" link that reopens the banner. Use it in your footer or on your cookie policy page. You can change the text: [getcookie_preferences]Change cookie settings[/getcookie_preferences].

WooCommerce

Turn on WooCommerce checkout checkbox under Advanced Settings to add an unticked marketing-consent checkbox to the classic WooCommerce checkout (it is not shown on the block-based Checkout). The shopper's choice, its time and the browser's user agent are saved with the order in your WordPress database; the IP address is not stored. The checkbox is off on new installs; sites that installed an earlier version keep it on until they turn it off.

Troubleshooting

  1. Check that the plugin is active and the Domain ID under GetCookies > Settings matches the one in your dashboard.
  2. Clear your caching plugin and CDN cache.
  3. Check the browser console for errors.
  1. Check that Hold back trackers is on under Settings > GetCookies.
  2. Check that Automatic tracker blocking is On in your GetCookies dashboard (sites added before November 2026 start in Monitor).
  3. Mark scripts GetCookies does not recognise with type="text/plain" and data-cookieconsent, as shown above.

Caching issues

Exclude getcookies.co/api/v1/widget/loader.js from JavaScript minification and combination, and clear the cache after changing settings.

Still stuck?

Email [email protected] with your domain and what you tried. Signed-in customers can also open a ticket from the dashboard.