J

Joomla plugin

A system plugin that adds ConsentTrustee to your Joomla 4 or 5 site. Installs like any other Joomla extension.

Installation

1. Install the plugin

Download the ConsentTrustee plugin ZIP file. In your Joomla admin, go to System > Install > Extensions. Upload the ZIP file and click Install.

2. Enable the plugin

Go to System > Manage > Plugins. Search for ConsentTrustee and click on it. Set the Status to Enabled.

3. Configure

On the plugin settings page, fill in your domain slug from the ConsentTrustee dashboard. The other settings are optional:

  • Script position — head (default) or before the closing body tag
  • Language override — leave blank for auto-detection
  • API URL — only change this if you self-host ConsentTrustee
  • Google Consent Mode — toggle on/off, choose Basic or Advanced

4. Save and check

Save the plugin. Open your site in an incognito window. You should see the consent banner.

How it works

The plugin hooks into Joomla's onBeforeCompileHead event to inject the ConsentTrustee script into the page head. If you choose the body position instead, it uses onAfterRender to place the script before the closing body tag.

The plugin only runs on the frontend — it will not affect your Joomla admin panel.

Script blocking

If you have third-party scripts in your Joomla template that need to be blocked until consent, you will need to modify those script tags manually. Change the type and move the src:

<!-- Before -->
<script src="https://www.googletagmanager.com/gtag/js?id=G-XXXXX"></script>

<!-- After (blocked until consent) -->
<script type="text/plain" data-ct-category="statistics"
  data-src="https://www.googletagmanager.com/gtag/js?id=G-XXXXX"></script>

Requirements

  • -Joomla 4.0 or later (including Joomla 5)
  • -PHP 8.0 or later
  • -A ConsentTrustee account with a configured domain