Repository for FrontConsent, a WordPress plugin providing a GDPR/ePrivacy-compliant cookie consent banner, following the Spanish AEPD guide.
- Cookie Notice — configurable cookie consent banner (bar/box/popup) that gates Google Tag Manager, GA4, and supported tracking integrations (Clientify, Brevo, ChatGPT Ads) behind consent, with Google Consent Mode v2 support for compatibility with Google Site Kit and other analytics plugins.
- Cookieless video embeds — YouTube iframes are switched to
youtube-nocookie.comand Vimeo iframes getdnt=1, so embedded videos set no cookies before consent (filterfrcn_privacy_enhanced_embeds). - Acceptance stats — aggregate accepted/rejected counter on the settings page.
- Migration from FrontBlocks — automatically imports settings and stats from FrontBlocks Site Tools' bundled Cookie Notice module, which FrontConsent replaces.
- Import from GDPR Cookie Compliance — explicit "Import settings" action that maps its Integrations tab (GA4, GTM, and the container configured in GTM4WP) and banner texts/expiration/position into FrontConsent without overwriting existing values; unsupported integrations (Google Ads, Meta Pixel, Microsoft UET/Clarity, reCAPTCHA) are reported, not imported. See
includes/GDPR_Cookie_Compliance_Migration.php. - Consent-gated attribution cookies — WooCommerce order attribution scripts (
sbjs_*cookies) stay inert until the visitor accepts (filterfrcn_cookie_notice_gated_script_handles), and GTM4WP's own Consent Mode default is suppressed so FrontConsent's denied default is the only one (filterfrcn_cookie_notice_suppress_gtm4wp_consent_default). - WP Rocket compatibility — FrontConsent's scripts are excluded from WP Rocket's "Delay JavaScript execution" (filter
rocket_delay_js_exclusions), so the banner responds to the first click and Consent Mode reaches Google tags before they fire. - Tracking cookies deleted on rejection — rejecting, withdrawing an earlier acceptance, or returning after a rejection deletes known analytics/marketing cookies (
_ga,_ga_*,_gid,_gcl_*,_fbp,__obref,sbjs_*…) on the host and its parent domains, plus matching localStorage/sessionStorage entries (oaiq_*), so nothing set while consent was granted stays behind (filterfrcn_cookie_notice_purge_cookies). - Compliance scanner — a Scanner tab that, on an administrator's click, sends the site's home URL to the tuwebcumple.es API (
https://tuwebcumple.es/api/v1/, filterfrontconsent_scanner_api_url), follows the scan until it finishes and shows the grade, headline and per-requirement results; a dashboard widget shows the last grade. Results are stored in thefrontconsent_scan_resultoption. One scan every 10 minutes per site, on top of the API's own rate limits. Seeincludes/Admin/Scanner.php. - Extensible settings tabs — the settings page renders as a tab shell (Settings, plus a PRO upsell tab by default). A companion plugin such as FrontConsent PRO can add its own tab via the
frontconsent_settings_tabsfilter and render its panel on thefrontconsent_settings_form_tab_panelsaction (fields saved through the main form) orfrontconsent_settings_tab_panelsaction (a panel with its own form, e.g. a License tab).
See docs/plan.md for the product plan (market, Free/Pro split, roadmap) and AGENTS.md for guidelines for AI coding agents working on this plugin.