The integration of Google Analytics and scripts is a task that Joomla! administrators have to deal with time and again.

Although the legal situation of whether the use of Google Analytics is permitted within the terms of the GDPR has not yet been conclusively clarified by the relevant court rulings, one thing is already clear: the integration of Google Analytics without the consent of the site visitors is not permitted. Accordingly, the consent of a website's visitors is required for the use of Google Analytics.

In the following, we would like to show you how you can integrate Google Analytics and other services into your website with the help of a proper consent manager.

Consent Manager

What is a Consent Manager

A Consent Manager is a tool for managing the consent of users to the processing of their personal data.

Consent managers make it easy to ask for and save consent to specific services. Third-party services, such as Google Analytics, can be grouped in different categories and consent can be requested for each individual service or specific categories. For example, it would be possible for visitors to agree to the use of Google Analytics, but at the same time reject tracking by a Facebook pixel.

preview consent

A simple cookie banner such as " This page uses cookies" is no longer in compliance with the current legal situation.

Joomla! component or Consent Management Platform

When integrating a Consent Manager into Joomla!, there is one crucial question that needs to be clarified first: Should a Joomla! component be used and thus also the consent data be stored directly in the website, or should an external consent management platform (e.g. UserCentrics) be used?

Advantages KickConsentManager (Joomla! component):

  • Simple integration into the website
  • No development knowledge necessary
  • Manage website and content information in one place
  • One-off payment (This is an attractive business case for agencies, as they can act as resellers to customers and earn money from the provision of a licence).

Advantages Consent-Management-Plattform

  • Consent information can be managed and used across platforms
  • Flexible pricing models

Kick Consent Manager (KCM)

The Kick Constent Manager by Hamburg-based extension-developer Kicktemp is, in our eyes, the tool of choice in the field of Joomla! components. In addition to all the necessary functions for managing the actual consents, the tool also offers four other decisive advantages:

  • Multilanguage support
  • Powerful styling customisations without CSS knowledge
  • Support for Joomla 3.X und 4.X
  • Quick support with community involvement

Service Category, Services, Cookies and Scripts

The tool controls the administration of consents and the associated scripts (which in turn set cookies) with the help of service categories, services and associated cookies and scripts.

Service Categories:

Services such as Google Analytics, Matomo or Facebook Pixel are collected and organised in service categories. For example, statistics services can be assigned to the category "Statistics" and remarketing scripts to "Marketing". For each service category, it can be determined whether it is (technically) necessary or not.

The services that are assigned to a category that is marked as (technically) necessary cannot be deselected by visitors to the website and are always enabled. An example of this would be the Joomla! session cookie, which is technically required and therefore does not require consent, but should at the same time be marked in the Consent Manager.

Service categories that are marked as not required are requiring consent. Services contained therein are only enabled when users actively agree to their use (opt-in).


In the context of the Kick Consent Manager, a service describes a (third-party) service such as Google Analytics, HubSpot or the Joomla session. Any number of services can be created and assigned to a service category. In addition to the name of the service and the assignment to a category, it is possible to store further information about the service. This includes, for example, the purpose or the provider of the particular service.

Cookies & Scripts

Finally, the cookies and scripts that are set or executed as soon as consent is given must be entered for each service. At this point, information should be provided about the purpose and duration of the cookies.

Implementing a Service

Now that we've gone through the theory, let's finally get down to the practice. We integrate Google Analytics into our website.

service categories

Create service category and service

To do this, we first create a new service category "Statistics" and set the settings as follows:

Required: No
Description: Statistics cookies help website owners understand how visitors interact with web pages by collecting and reporting information anonymously.
Show benefits: No

service categories

We then create a new service called "Google Analytics" with the following information:

  1. Purpose: This is a web analytics service.
  2. Owner: Alphabet Inc, Google LLC, Google Ireland Limited.

If the website is available in multiple languages, appropriate texts can be entered for each language.

Adding the Google Analytics Tracking-Script

script detail

In the last step, we add the (anonymised) code provided by Google Analytics and the cookies that are set in this context.

Let's start with the script. In the Scripts section, we add a new script and also name it Google Analytics. As a service for the script, we now select the previously created service "Google Analytics". Our Analytics script is integrated in the head of the website.

In the Code section, we insert the code provided by Google for the corresponding Analytics property.

The necessary technical adjustments, such as the integration of the required <script> tags around the code to be executed, are automatically handled by KickConsentManager.

There is nothing more to do at this point. The stored script is now only loaded and executed if website visitors have previously agreed to the use of Google Analytics.

Adding Google Analytics Cookies

When using Google Analytics, cookies are usually also set, which must be marked accordingly in the Consent Manager. The developer tools show us exactly which cookies are set (there are numerous instructions on the web).

In the "Cookies" section of the Consent Manager, each individual cookie must be created and information on the duration and purpose of the respective cookie must be stored.

Cookies that are usually set in the context of the use of Google Analytics are the following:





Registers a unique ID to generate statistical data on how the visitor uses the website.

2 Years


Used to throttle the request rate.

1 Minute


Registers a unique ID to generate statistical data on how the visitor uses the website.

24 Hours


In addition, each of the cookies created must of course be assigned to the "Google Analytics" service previously set up.


There you go - all the necessary information are now added to our Consent Manager. To display the Cookie Consent on the website, it is necessary to activate the plugin "Kick Consent Manager Plugin".

In the "Design" section of the component's settings, you will also find a number of parameters for customising the visual appearance of the cookie banner. In this way, you can adapt the appearance of the Kick Consent Manager in the frontend to the design of the website according to your wishes.

The described approach for implementing Google Analytics can be transferred to other services as desired.

  1. Create a service and assign it to the desired service category
  2. Save scripts and assign them to the service
  3. Check whether further cookies are set by the deposited script (check with the help of the developer tools)
  4. Create the (newly) set cookies in the Kick Consent Manager and add them to the desired service.

Have fun trying it out!

Attention: All BackupMonkey customers receive a 25% discount when buying Kicktemp products. You will find the coupon code in your BackupMonkey toolbox.

Please note that we do not assume any liability for the legal security of the implementation. As described at the beginning, the legal situation has not yet been sufficiently clarified by court rulings.