RoyalComply – Cookie Consent, GDPR & CCPA Compliance Banner

RoyalComply – Cookie Consent, GDPR & CCPA Compliance Banner

توسط

RoyalComply is a cookie consent and privacy compliance plugin for WordPress. It blocks analytics and marketing scripts until consent is given, supports Google Consent Mode v2, and adapts banner behavior based on the visitor’s jurisdiction (GDPR, CCPA, and 19 US state privacy laws).

The plugin runs entirely on your server. It does not connect to any external services.

Works With Your Stack

RoyalComply integrates with the analytics, advertising, and tag management tools you already use — no per-vendor configuration required:

  • Analytics — Google Analytics 4 (GA4), Google Tag Manager, Hotjar, Microsoft Clarity, Matomo, Plausible, Fathom, Mixpanel, Amplitude, Heap.
  • Advertising pixels — Meta Pixel (Facebook / Instagram), Google Ads, LinkedIn Insight Tag, TikTok Pixel, Pinterest Tag, Twitter (X) Pixel, Snapchat Pixel, Reddit Pixel.
  • Themes and page builders — Elementor, Divi, Beaver Builder, Bricks, Gutenberg, Astra, GeneratePress, Kadence, Avada, OceanWP — works with any theme or builder.
  • eCommerce and memberships — WooCommerce, Easy Digital Downloads, MemberPress, Restrict Content Pro, LearnDash, LifterLMS. Cart and session cookies are auto-categorized as “Necessary” and never blocked.
  • Caching plugins — WP Rocket, W3 Total Cache, LiteSpeed Cache, WP Super Cache, FlyingPress, Cloudflare APO. Banner state is read client-side from localStorage so cached pages render correctly for every visitor.
  • Multilingual — Polylang, WPML, qTranslate, TranslatePress. Banner text supports per-language translation; the language-selection cookie is auto-categorized as “Preferences”.
  • CDN geo headers — Cloudflare (CF-IPCountry), Fastly, KeyCDN, Sucuri. Geo detection runs server-side from existing CDN headers with a browser-timezone fallback — no IP geolocation API is contacted.

RoyalComply is a free alternative to CookieYes, Complianz, Cookiebot, Iubenda, OneTrust, and Termly — without per-page-view billing, per-domain licensing, or external SaaS dependencies.

Features:

  • Script blocking — Uses the WordPress script_loader_tag filter to change the type attribute of analytics and marketing scripts to text/plain until consent is given, preventing execution.
  • Google Consent Mode v2 — Outputs the gtag('consent', 'default', {...}) call with a denied state before Google Tag Manager loads, and sends consent update events when the visitor makes a choice.
  • Regional banner behavior — Detects the visitor’s region from CDN request headers (Cloudflare CF-IPCountry etc.) with a browser-timezone fallback. Banner behavior switches between opt-in (GDPR), opt-out (CCPA), and other jurisdictions as configured.
  • Cookie scanner — Scans your site’s rendered HTML for known third-party script patterns (Google Analytics, Facebook Pixel, Hotjar, etc.) and matches them against a built-in database of 50+ cookie names. The scanner reads HTML your site already produces. No outbound HTTP requests are made.
  • Consent logging — Stores each consent choice with a SHA-256 hashed visitor identifier, timestamp, and category selections. Exportable to CSV. No IP addresses or personally identifiable information are stored.
  • Banner customization — 6 position options, bar or box layout, full color control. Combined CSS and JavaScript on the frontend is under 8KB.
  • Geo detection — Reads the CF-IPCountry and similar headers already present in the incoming request. Falls back to the browser’s timezone via JavaScript. No IP lookup service is called.

Cookie Categories:

  • Necessary — Always allowed. WordPress sessions, WooCommerce cart, PHP sessions.
  • Analytics — Google Analytics, Hotjar, Clarity, Matomo, Plausible.
  • Marketing — Facebook Pixel, Google Ads, LinkedIn, TikTok, Pinterest.
  • Preferences — Language selection (Polylang, WPML, qTranslate).

Compliance Coverage:

  • GDPR (EU/EEA) — Opt-in consent required
  • CCPA (California) — Opt-out with “Do Not Sell” link
  • VCDPA (Virginia), CPA (Colorado), CTDPA (Connecticut), UCPA (Utah), TIPA (Tennessee), ICDPA (Indiana), MTCDPA (Montana), TDPSA (Texas), OCPA (Oregon), DPDPA (Delaware), FDBR (Florida), NJDPA (New Jersey), NHDPA (New Hampshire), KCDPA (Kentucky), NEBDPA (Nebraska), ICDPA (Iowa), MCDPA (Maryland), MNDPA (Minnesota)

External services

RoyalComply does not connect to any third-party services. The plugin runs entirely on your own WordPress install and does not send data to any external server, API, or CDN.

The built-in cookie scanner makes a single loopback HTTP request to your own site’s homepage (home_url( '/' )) using the WordPress wp_remote_get() function, with a 10-second timeout. This request goes to the same WordPress install; no third-party service is contacted. The scanner then reads the returned Set-Cookie response headers and the HTML response body, and searches the body for known third-party script hostnames (for example google-analytics.com, connect.facebook.net, js.stripe.com, widget.intercom.io, cdnjs.cloudflare.com). These hostnames are stored as pattern strings inside the plugin and are compared against the response body using PHP’s stripos() function. The plugin does not make any network requests to the services the pattern strings refer to; it only reads HTML that your own site already generates.

The scanner runs only when the site administrator clicks the “Scan Site” button in the RoyalComply admin screen. It is not run on a schedule and is not triggered by visitors.

Geo detection reads HTTP headers that are already present in the incoming page request (for example Cloudflare’s CF-IPCountry header) and, as a JavaScript fallback, reads the visitor’s timezone from the browser using Intl.DateTimeFormat().resolvedOptions().timeZone. No IP geolocation API is contacted.

Google Consent Mode v2 outputs a gtag('consent', 'default', {...}) JavaScript call in the page. This call runs in the visitor’s browser and is consumed by Google Tag Manager or gtag.js if those are already installed on the site. RoyalComply itself does not load Google’s scripts; the integration only configures the consent state that the site’s existing Google scripts read.

  1. Upload the royalcomply folder to /wp-content/plugins/.
  2. Activate the plugin through the Plugins menu.
  3. Go to RoyalComply > Dashboard to configure.
  4. Run the cookie scanner to detect existing cookies.
  5. Customize your banner appearance under Banner Design.

سوالات متداول

How does script blocking work?

RoyalComply uses WordPress’s script_loader_tag filter to change script types from text/javascript to text/plain until consent is given. This prevents scripts from executing. The approach does not require output buffering or DOM manipulation.

Does it work with Google Tag Manager?

Yes. When Google Consent Mode v2 is enabled, RoyalComply outputs the required gtag('consent', 'default', {...}) call before GTM loads, then updates consent state when the user makes a choice.

Is this plugin GDPR compliant?

RoyalComply is designed to help site owners meet GDPR’s consent requirements. It blocks analytics and marketing scripts until the visitor gives explicit opt-in consent, stores a record of each consent choice with a SHA-256 hashed identifier, and provides a “Reject All” button with the same prominence as “Accept All”. Whether a given site is fully GDPR compliant also depends on the rest of its privacy practices (privacy policy, data processing agreements, etc.), which are outside the scope of this plugin.

Does this work for CCPA?

Yes. When the visitor’s region is detected as California (or any configured opt-out jurisdiction), RoyalComply switches the banner to opt-out mode and displays a “Do Not Sell or Share My Personal Information” link that records the visitor’s opt-out choice.

Does it make external API calls?

No. Geo detection uses CDN headers (Cloudflare, etc.) that are already present in the request, plus browser timezone as a fallback. No third-party services are contacted.

Is the consent log GDPR-compliant?

Yes. Visitor identifiers are SHA-256 hashed with a site-specific salt. No IP addresses or personally identifiable information is stored.

Can I use this with WooCommerce?

Yes. WooCommerce session and cart cookies are automatically categorized as “necessary” and are never blocked.

How does RoyalComply compare to CookieYes, Complianz, Cookiebot, or Iubenda?

CookieYes, Complianz, Cookiebot, Iubenda, OneTrust, and Termly are commercial cookie consent solutions that typically charge $9–49/mo per site or per-page-view (Cookiebot’s pricing scales with monthly visitors and can reach hundreds of dollars per month for high-traffic sites). RoyalComply is free with no usage limits, no per-page-view billing, and no external SaaS dependency. Core features — script blocking, Google Consent Mode v2, GDPR opt-in, CCPA opt-out, regional auto-detection, consent logging, and the cookie scanner — are included.

Does RoyalComply work with Google Analytics 4 (GA4)?

Yes. Enable Google Consent Mode v2 in RoyalComply settings and the plugin outputs the required gtag('consent', 'default', { analytics_storage: 'denied', ad_storage: 'denied', ... }) call before GA4 or Google Tag Manager loads. When the visitor accepts, RoyalComply fires a gtag('consent', 'update', ...) event with their selections and GA4 begins receiving data. Without consent, GA4 still runs in cookieless mode and reports basic anonymized events (this is Google’s intended Consent Mode v2 behavior).

Does RoyalComply work with Meta Pixel (Facebook Pixel) or other advertising pixels?

Yes. Meta Pixel, Google Ads, LinkedIn Insight Tag, TikTok Pixel, Pinterest Tag, Twitter (X) Pixel, Snapchat Pixel, and Reddit Pixel are auto-categorized as “Marketing” cookies and blocked until the visitor accepts marketing consent. The script-blocking approach uses WordPress’s script_loader_tag filter to change each script’s type attribute to text/plain until consent is granted, so pixels never fire prematurely.

Will RoyalComply slow down my WordPress site?

No. The combined frontend CSS and JavaScript is under 8KB. Banner state is checked from localStorage, which is faster than a server round-trip. The cookie scanner runs only when an admin clicks “Scan Site” — never on a visitor request.

Does RoyalComply work with caching plugins like WP Rocket, W3 Total Cache, or LiteSpeed Cache?

Yes. The banner is rendered with the same HTML for every visitor and the show/hide decision is made client-side by reading localStorage. Page caches serve the same HTML to all visitors and the banner correctly hides for returning visitors who already gave consent. No cache exclusion rules required.

How do I show a “Do Not Sell My Personal Information” link for California (CCPA) visitors?

In RoyalComply settings, enable CCPA mode and set California as an opt-out jurisdiction. When a visitor’s request arrives with a CDN header indicating California (or matches a California timezone fallback), the banner automatically switches from opt-in to opt-out mode and displays the “Do Not Sell or Share My Personal Information” link. Clicking the link records the visitor’s opt-out in the consent log.

Can I export my consent log for DPO or compliance audits?

Yes. Go to RoyalComply > Consent Log and click “Export CSV”. The export includes hashed visitor IDs, timestamps, region, banner version, and category selections — sufficient for demonstrating consent under GDPR Article 7 and CCPA record-keeping requirements. No IP addresses are exported.

×
نظری برای این آیتم موجود نیست.
0 0 رای ها
امتیازدهی
اشتراک در
اطلاع از
0 نظرات
قدیمی‌ترین
تازه‌ترین بیشترین رأی
نسخه حجم فایل SHA256 تغییرات دانلود
1.0.6 129 کیلوبایت -
دانلود
×
بدون امتیاز

قیمت:

رایگان

نگارش

1.0.6

آخرین انتشار

16 اردیبهشت 1405

آخرین بروزرسانی

3 ماه پیش

نصب های فعال

-

نگارش وردپرس

وردپرس 6.2+

تست شده از نسخه

وردپرس 6.9.4

نگارش PHP

PHP 7.4+

نسخه ها

1 نسخه