Iubenda logo
Start generating


Table of Contents

Cookie Solution – Joomla! Plugin Installation Guide

The Joomla! plugin by iubenda allows you to automate the implementation of the cookie law rules, drastically reducing the necessity for direct interventions in the site’s code.

  • The plugin is downloadable directly from the official Joomla! Extensions Directory
  • The plugin requires Joomla! 2.5 or above
  • The plugin works better with versions of PHP 5.3 or later
iubenda Cookie Solution for Joomla!


  • The plugin automatically adds the iubenda code to all the pages of a site (to the HEAD section).
  • Allows you to automatically or manually block scripts that can install cookies prior to consent, without the need of direct intervention on the code.
  • Asynchronously re-activates cookie scripts once consent is collected.
  • Handles the display of the cookie banner and cookie policy, allowing you to fully customize the banner to match the look and colors of your site if needed.
  • Saves user preferences about the use of cookies and displays a clean page (without banner) to users who have already provided their consent.
  • Integrates with IAB’s Transparency and Consent Framework.
  • Features an easy-to-use interface for entering custom scripts and iframes.
  • Detects bots/spiders and serves them a clean page so that your SEO efforts are never compromised.
  • It supports the auto-assignment of categories when blocking scripts.
  • AdRoll
  • AddThis widgets
  • Bing
  • CodePen
  • Criteo
  • Disqus
  • Elevio
  • Facebook Comments
  • Facebook widgets
  • Freshchat
  • Google AdSense
  • Google Analytics
  • Google Maps
  • Google ReCaptcha
  • Google Site Search
  • Google Tag Manager
  • Google oAuth
  • Google+ widgets
  • Headway
  • Instagram widgets
  • Kissmetrics
  • LinkedIn widgets
  • Mixpanel
  • Neodata
  • Olark
  • Optimizely
  • Outbrain
  • PayPal widgets
  • Pingdom
  • Pinterest widgets
  • Segment
  • ShareThis widgets
  • Twitter widgets
  • UserVoice
  • Vimeo
  • YouTube


If you’re installing the plugin for the first time, jump directly to the installation instructions here.

Otherwise, if you’ve previously installed an older version of the plugin directly from this site, you can update to the latest version of the plugin by following the steps below.

  1. First, delete the old version of the plugin — Click on Extensions > Manage, select the plugin and click on the Uninstall button at the top of the section.
  2. Go to the official Joomla! Extension Directory here and download the plugin.
  3. Install by following the installation steps below.


  • Download the free plugin here.
  • Access your Admin panel (http://example.com/admin123/) and log in
  • Go to your Extensions menu that is on the top of the screen in the Admin panel and click on Manage > Install
  • Drag and drop file zipped iubenda plugin file or click Browse for file and select the iubenda file from your computer.


  • Click on Extensions > Manage > Manage;
  • Search “iubenda” and enable the plugin.

How to add the cookie banner and modify settings

  • Click on the item Extensions > Plugins;

  • Search “iubenda” and click on the plugin name (your can see what the interface looks like below): Cookie Solution - Joomla! plugin

  • Copy your Cookie Solution code from the Cookie Solution embed section of your iubenda account Embed Cookie Solution (If you haven’t already generated your Cookie Solution code within your iubenda account, you can read more about how to do that here: introduction to the iubenda Cookie Solution)

  • Click on Settings, paste that code into the plugin form and save: Cookie Solution - Joomla! plugin (Being PHP native, we recommend the primary, faster option for the parsing engine. If you’re experiencing some issues, try with the alternative based on a custom HTML DOM class)


Once configured, the plugin will begin to show the banner on which your cookie policy will be shown/linked to users that visit your site for the first time without the need for any other further configurations. The plugin will also recognize and automatically detect and block the cookies indicated in the above block-list, that are present on your site.


Our Joomla! extensions automatically block scripts that are generated on the server side (therefore returned by PHP by Joomla). Scripts that are inserted into the page via JavaScript after the loading process of that page are not and cannot be blocked automatically.

These scripts can be blocked by entering the source into the Custom Script boxes in the plugin console or by using the manual wrapping method illustrated in the example below and (in more detail) in this help post

Blocking custom scripts from within the console

The Custom Scripts field makes it easy for you to block scripts inserted into the page directly from within the plugin console. This greatly reduces the need for direct edits to the site’s code.

Here’s how to do it:

  • In your admin panel, go to Extensions > Plugins.
  • Next, search “iubenda”, click on the plugin name then the Settings tab at the top.
  • Scroll down to find the Custom scripts and Custom iframes fields at the bottom of the page.Joomla custom and iframe scripts fields
  • Enter your script or iframe sources as needed, assign the category (optional), and click the Save & Close button at the top of the page.

Usage Examples

Using these fields are pretty straightforward. Simply enter the script or iframe src attribute you’d like to block.


If you wanted to block a social button (which inserts scripts into the page via JavaScript), you’d simply need to enter the script source, e.g. connect.socialwebsite.net/en_US/track.js into the scripts field.


Let’s say you wanted to block scripts inserted into the page via the following iframe

<iframe width="1280" height="720" src="https://www.videowebsite.com/embed/xxFhMChxx" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

What you’ll need to enter into the iframe field would be videowebsite.com/embed/ as this is the actual source of the scripts. Be careful NOT to enter the component id (videowebsite.com/embed/xxFhMChxx) to ensure that all scripts coming from the actual source are blocked.

Manual Use (wrapping method)

This method requires you to directly modify your site’s code. You’ll need to go into the relevant section of your site’s code and add the scripts to be blocked as explained below.

Here’s an example of how to make the plugin manually work for a Social button (which inserts scripts into the page via JavaScript).

    (function(d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) return;
        js = d.createElement(s);
        js.id = id;
        js.src = "//connect.socialwebsite.net/en_US/sdk.js#xfbml=1&version=v2.3&appId=808061959224601";
        fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'socialwebsite-jssdk'));

If there are HTML / IMG / IFRAME elements, you will need to do it this way:

      <iframe src="...
      <img src="...

If you’ve enabled the per-category consent feature you’ll need to assign the purpose. Resuming the social button example, being part of the “Experience enhancement” purpose (id 3):


To stop automatic parsing/replacing the iframe/scripts that contain a defined src:

      <script type="text/javascript">...</script>

See also