EARN UP TO 50% COMMISSION WITH OUR RESELLER ACCOUNTS + REGULAR PASSIVE INCOME SIGN UP TODAY

Joomla Platform

4 min read

Joomla gives you two reliable ways to install CookieScan: editing your template's index.php file directly, or using a custom code plugin. This guide covers both.

Before you start

You will need:

  1. An active CookieScan subscription (view plans)
  2. Your banner installation code from the CookieScan dashboard (Cookie Banner → Install Code)
  3. Super User access to your Joomla admin
  4. For Method 2: a plugin like Sourcerer or JavaScript Framework Plugin

The install code looks like this:

<script src="https://banner.cookiescan.com/js?id=YOUR-COOKIESCAN-ID"></script>

Replace YOUR-COOKIESCAN-ID with the code from your dashboard.

Method 1: Edit your template's index.php (recommended)

Step 1 – Open Template Manager

  1. Log into your Joomla admin (/administrator)
  2. Go to System → Site Templates (Joomla 4/5) or Extensions → Templates (Joomla 3)
  3. Find your default (active) template and click to edit it

Step 2 – Open index.php

  1. In the left sidebar, open html → then find index.php at the root of the template
  2. Click to open it in the code editor

Tip: Before editing, create a copy of the template first via Copy Template so you have a backup and to avoid losing changes on template updates.

Step 3 – Add the CookieScan script

Find the opening <head> tag or the <jdoc:include type="head" /> line. Add your CookieScan script immediately after the head tag or after the jdoc:include line:

<head>
  <jdoc:include type="head" />
  <script src="https://banner.cookiescan.com/js?id=YOUR-COOKIESCAN-ID"></script>
  ...rest of your head content...
</head>

Step 4 – Save and verify

  1. Click Save
  2. Clear your Joomla cache: System → Clear Cache
  3. Visit your site in a new incognito window

Method 2: Use a plugin

If you'd rather not edit template files, use a custom code plugin.

Option A: Sourcerer (free extension)

  1. Install Sourcerer from the Joomla Extensions Directory
  2. Create a new Custom Module in Content → Site Modules
  3. Assign the module to the head position
  4. In the content, add your CookieScan script using Sourcerer tags
  5. Publish the module, assign to All pages
  6. Clear cache

Option B: JCH Optimize or similar

Many Joomla performance/SEO plugins have a custom code field for head injection. If you use one, paste your CookieScan script there.

Method 3: Install via Google Tag Manager

If GTM is already installed on your Joomla site:

  1. In CookieScan, open Cookie Banner → Install Code and switch to the Google Tag Manager Install tab
  2. Copy your CookieScan ID
  3. In GTM, go to Templates → Search Gallery and add the CookieScan template
  4. Create a tag using the template, paste your ID
  5. Trigger: Consent Initialization – All Pages
  6. Submit and publish

Disable Joomla's built-in Privacy Consent plugin (if enabled)

Joomla has a basic Privacy Consent feature. If enabled, you may want to let CookieScan handle consent instead:

  1. Go to System → Manage → Plugins
  2. Search for Privacy – Consent
  3. Disable or adjust as needed based on your compliance requirements

Verify the installation

  1. Visit your site in a new incognito window
  2. The CookieScan banner should appear
  3. Open DevTools (F12) → Network tab → filter by cookiescan
  4. Confirm banner.cookiescan.com loads successfully

Use Verify Installation in your CookieScan dashboard for a final check.

What happens next

Once installed, CookieScan handles everything automatically:

  • Scans your Joomla site and detects all cookies (including those from third-party extensions)
  • New cookies appear in Cookie Manager → Unclassified – categorise them
  • Blocks cookies until user consents
  • Logs every consent decision

Troubleshooting

Banner not appearing

  • Clear Joomla cache (System → Clear Cache)
  • Clear any server-side cache (Varnish, CDN)
  • View page source and search for cookiescan to confirm the script is in the <head>
  • Check if a caching plugin is minifying/stripping the script

Changes lost after template update

  • Use a template override/copy (created via Copy Template) so updates don't overwrite your changes
  • Or switch to Method 2 (plugin-based install)

Cookies still loading before consent

  • Some Joomla extensions load cookies server-side or very early
  • Run Cookie Manager → Rescan Domain in CookieScan to catalogue them
  • Categorise any new ones found so the banner can block them

Full documentation

For detailed setup help, see the support guide linked in your CookieScan dashboard, or visit our support guides.