Back to the help center

Integrations

WordPress Plugin Setup

Step-by-step guide to installing our WordPress plugin

Step-by-step guide to installing the GetCookies WordPress plugin for cookie consent management.

Installation Methods

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

Upload the plugin

  1. Download the plugin ZIP from your GetCookies dashboard (Domains > Integrations)
  2. Go to Plugins > Add New > Upload Plugin
  3. Choose the ZIP file and click Install Now
  4. Click Activate Plugin

Configuration

Step 1: Connect Your Account

  1. Go to Settings > GetCookies in WordPress admin
  2. Enter your API Key (found in GetCookies Dashboard > Settings > API)
  3. Click Connect Account

Step 2: Select Your Domain

  1. Choose the domain from the dropdown that matches your WordPress site
  2. If not listed, add the domain in your GetCookies dashboard first

Step 3: Configure Settings

SettingDescriptionRecommended
Auto-block ScriptsAutomatically block known tracking scriptsEnabled
Show BannerDisplay cookie consent bannerEnabled
Widget PositionWhere the preferences button appearsBottom Left
Privacy PageLink to your privacy/cookie policySelect your policy page

Advanced Features

Automatic Script Blocking

The plugin automatically detects and blocks common tracking scripts:

  • Google Analytics / GA4
  • Google Tag Manager
  • Facebook Pixel
  • Hotjar
  • LinkedIn Insight
  • And many more...

Shortcodes

Add cookie-related elements anywhere on your site:

[getcookies_settings]

Displays the full cookie preferences interface inline.

[getcookies_button]

Adds a "Manage Cookie Preferences" button.

PHP Functions

For theme developers:

php
<?php
// Check if user has consented to marketing cookies
if (getcookies_has_consent('marketing')) {
    // Load marketing scripts
}

// Get all consent choices
$consent = getcookies_get_consent();
?>

Troubleshooting

  1. Check that the plugin is activated
  2. Verify your API key is correct
  3. Clear any caching plugins
  4. Check browser console for JavaScript errors
  1. Enable "Auto-block Scripts" in settings
  2. For custom scripts, add the data-cookiecategory attribute:
html
<script data-cookiecategory="marketing" src="tracking.js"></script>

Caching Issues

If using caching plugins (WP Super Cache, W3 Total Cache, etc.):

  1. Exclude the GetCookies JavaScript from caching
  2. Clear cache after changing settings
  3. Consider using "Fragment Caching" for the consent banner

Still stuck?

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