Skip to main content

Integration

Cookie banner for WordPress and WooCommerce without a plugin

Last reviewed

Short answer

To add a cookie banner to WordPress that collects valid consent, you need a tool that collects consent before analytics and marketing run, offers an equal reject option and stores proof of each decision. With Limes you paste one script tag into your site's header, for example with the free WPCode plugin or your theme's custom code setting, and manage the banner, scanner and Google Consent Mode v2 from the Limes dashboard. Google tags receive the consent signals. Other scripts wait for consent when you mark them with data-limes-category or load them through Google Tag Manager.

Install
One script tag in <head>
Works with
Elementor, Divi, block themes
WooCommerce
Cart & checkout keep working
Free plan
2,500 sessions/mo

Why a script tag instead of a consent plugin

Most WordPress consent plugins run PHP on every request and store logs in your database. Limes runs entirely in the browser as one precompiled script, so it adds no database queries and stays the same when you change theme or page builder.

  • The same banner and consent categories for WordPress and any other platform you use.
  • Consent proofs stored in Frankfurt, independent of backups or migrations of your WordPress site.
  • Banner templates and texts update centrally, without plugin updates.

Setup in four steps

  1. Deactivate the old plugin

    Deactivate any previous cookie plugin so two banners never overlap.

  2. Paste the script

    Install WPCode, or use Elementor's Custom Code or your theme's header field, and paste the Limes script at the very top of the header.

  3. Add a settings link

    Add a "Cookie settings" link to your footer menu so visitors can change their choice.

  4. Purge the cache

    Purge your cache plugin and exclude the Limes script from "delay JavaScript" options so consent defaults are set first.

Paste at the top of the header
<script src="https://cdn.uselimes.com/v1/your-site-id.js"></script>

WooCommerce

Cart, session and checkout cookies are strictly necessary for the shop service the customer requested, so they stay active. Google Analytics and Google Ads tags receive Limes' Consent Mode signals, including tags from Google Analytics for WooCommerce or Site Kit. Meta Pixel and other non-Google tags wait for consent when you mark them with type="text/plain" and data-limes-category="marketing" or load them through Google Tag Manager.

Caching and performance plugins

Performance plugins such as WP Rocket, LiteSpeed Cache or Autoptimize can delay or combine scripts. Exclude the Limes script from delaying, deferring and combining, otherwise Google tags may fire before the consent default is set.

Frequently asked questions

Do I need a cookie banner on WordPress?

If your site uses analytics, advertising pixels, embedded videos or maps, or other non-essential cookies, yes. EU and German visitors must consent before these load.

Does Limes slow down WordPress?

No server-side work is added. The banner is one script loaded in the browser and isolated in a Shadow DOM, so it does not interfere with your theme's CSS.

Does Limes work with Elementor and Divi?

Yes. Use Elementor's Custom Code feature (location <head>, priority 1) or Divi's theme options integration to add the script.

What about embedded YouTube videos?

Write data-src instead of src on the YouTube iframe and add data-limes-category="marketing". Until the visitor consents, Limes shows a placeholder whose button grants only marketing. List YouTube as a service so visitors see it in the banner.

Add Limes to WordPress

Create your banner, paste one line into your header and you are done. Free for one domain.

Free up to 2,500 sessions. No payment details.