Consentimiento de cookies para Joomla: instalar el plugin
Instala mediante carga ZIP, activa en el gestor de plugins, configura el slug del dominio y GCM. Cómo el plugin del sistema se integra con el renderizado de Joomla.
Publicado el
Joomla's extension system makes installing a CMP plugin straightforward, but a few Joomla-specific quirks catch people out — particularly around Joomla 4 vs 5 compatibility, multi-language sites, and template-level script injection. This guide covers installing the ConsentTrustee Joomla plugin, configuring it for the common Joomla setups, and the gotchas that come up in production sites.
Compatibility
ConsentTrustee's Joomla plugin supports Joomla 4.x and 5.x. Joomla 3.x is no longer supported by Joomla itself (end-of-life August 2023), so we've dropped it from our compatibility matrix as well. If you're still on Joomla 3, the right answer is upgrading the CMS first, not looking for a Joomla 3-compatible CMP.
PHP 8.1 or later is required (matches Joomla 5's minimum).
Install
Standard Joomla plugin install via ZIP upload:
- Download the ConsentTrustee Joomla plugin ZIP from your CMP dashboard or the Joomla Extensions Directory.
- In the Joomla admin, go to System → Install → Extensions.
- Drop the ZIP onto the upload area, or click Browse Files and select it.
- Wait for the upload to complete. You should see a green “Installation successful” message.
- Go to System → Manage → Plugins and search for “ConsentTrustee.”
- The system plugin should be enabled by default. If not, enable it.
- Click the plugin name to open its configuration.
Configuration
The plugin's settings panel has three sections:
Domain. Paste your domain slug from the ConsentTrustee dashboard. This identifies which banner configuration to load. Without it, the script won't know which site is asking and will refuse to load.
Google Consent Mode v2. Toggle on if you run Google Analytics or Google Ads. The plugin will inject the GCM v2 default-denied signals before any Google tag has a chance to fire. Off by default to avoid interfering with sites that don't use Google.
Geo-targeting. Off by default. Enable if you want different banner behaviour for EU vs US vs other regions. Region detection is server-side via IP lookup; configure the rules in your ConsentTrustee dashboard, not in the Joomla plugin.
Hooking into Joomla's page render
The plugin uses Joomla's onAfterRoute and onBeforeRender events to inject the CMP script into <head> before your template renders. This means the banner is present before any content loads, which is what you want for GDPR compliance (script blocking has to happen before tracking scripts execute).
If your template does anything unusual with the head section — manually overriding scripts, using a non-standard head injection mechanism — the CMP script might not load in the right order. Test in incognito with DevTools open and verify the CMP script is present in the head before any tracking scripts.
Multi-language Joomla sites
Joomla's built-in multi-language support assigns each article a language and switches the active language based on URL prefix (e.g. /en/, /fr/, /de/) or visitor preference. The CMP plugin auto-detects the current language via Joomla's JFactory::getLanguage() and serves the matching banner translation.
Make sure your ConsentTrustee dashboard has translations for every Joomla language you serve. Missing translations fall back to English. The standard 9 languages we ship with (English, German, French, Spanish, Italian, Dutch, Polish, Portuguese, Swedish) cover most common Joomla deployments.
Script blocking for Joomla extensions
The CMP can't automatically block scripts injected by other Joomla extensions because it doesn't know which category they belong to. If you have Google Analytics installed via an analytics extension, or a chat widget from Tawk.to, you'll need to configure the script blocking manually.
Two ways to do this:
Option 1: Disable the third-party extension's script injection and add the script through the CMP. Most extensions have a setting to disable their built-in analytics. Disable it, then add your GA snippet to the ConsentTrustee dashboard's “Custom Scripts” section with the appropriate category. The CMP will inject it with the proper consent gating.
Option 2: Intercept the extension's injected script via the plugin's script-blocking rules. The plugin watches for script tags matching specified URL patterns and adds the consent attributes automatically. Configure the patterns in the plugin's “Auto Script Blocking” section.
Common Joomla gotchas
Caching plugins. Joomla's built-in cache and third-party caching extensions (JCH Optimize, Cache Cleaner) cache the rendered HTML. The CMP script tag is part of the cached HTML, so it loads on every visitor. The consent state itself is client-side (localStorage), so caching doesn't cause stale consent. No special configuration needed.
Template overrides. If you override Joomla's default page template, make sure your override calls $doc->getHeadData() or equivalent so the CMP's injected script tag actually renders. A template that bypasses the standard head rendering will silently drop the CMP script.
Joomla's “ReCAPTCHA” plugin. ReCAPTCHA sets cookies that fall under the Statistics category. The plugin needs to be wrapped in consent handling — easiest is to use ConsentTrustee's invisible reCAPTCHA mode and gate the actual challenge behind consent.
Smart Search and analytics modules. Some Joomla extensions track usage internally for their own analytics dashboards. Check each module's privacy settings and disable internal tracking that doesn't belong in “Necessary.”
What I'd read next
For the legal foundation, GDPR Cookie Consent. For the script-blocking pattern, How to Block Third-Party Scripts. And for Google Consent Mode v2 if you run any Google tags, Google Consent Mode v2.