Skip to content

Superlite CMS

Cookie Consent

The Cookie Consent module adds a consent banner to Superlite websites that use services requiring visitor consent.

The module is designed to work together with other Superlite modules, particularly Google Analytics 4. If Google Analytics is enabled, Cookie Consent can prevent analytics tracking until the visitor has made an appropriate choice.

The module can also create and link to a Privacy Policy for the website.

Installing the module

Open Modules in the Superlite administration interface.

Install the Cookie Consent module and activate it.

After activation, the module checks the website configuration to determine whether a consent banner is needed.

You do not need to manually add the consent banner to the theme.

The module adds the required functionality when the public website is generated.

When the consent banner appears

The Cookie Consent module does not display a banner simply because the module is installed.

A consent banner is shown when the website uses functionality that requires a consent choice.

For example, if the Google Analytics 4 integration is active, the Cookie Consent module can display the consent banner so that analytics storage and tracking can be controlled according to the visitor's choice.

If the website does not use Google Analytics or another supported service that requires consent, there may be no reason to display the banner.

This means two Superlite websites can have the Cookie Consent module installed but behave differently depending on which other modules and services are active.

Cookie Consent and Google Analytics 4

The Cookie Consent module integrates with the Superlite Google Analytics 4 configuration.

When both modules are active, analytics tracking is handled according to the visitor's consent choice.

You should configure Google Analytics through the Superlite Google Analytics 4 and Search Console module rather than manually adding the Google Analytics script to your theme.

This allows Cookie Consent to detect the integration and manage it correctly.

If you manually add another copy of Google Analytics to the theme, that copy may bypass the consent system.

Before consent is given

When consent is required, Superlite should not treat the visitor as having accepted analytics simply because the page has loaded.

The visitor is first shown the consent interface.

Analytics related functionality is then handled according to the visitor's choice.

This allows the website to load normally while keeping optional analytics functionality separate from essential website functionality.

Accepting cookies

The consent banner provides an option for the visitor to accept the relevant cookies or tracking.

When the visitor accepts, the module records the choice and allows the supported analytics functionality to operate.

The choice is remembered so that the visitor does not need to answer the same question on every page view.

Rejecting cookies

The visitor can also reject optional cookies or tracking.

When analytics consent is rejected, the Google Analytics integration should remain restricted according to the consent configuration.

The rest of the Superlite website continues to work.

Rejecting analytics cookies should not prevent visitors from reading pages, using navigation or accessing normal site content.

Remembering the visitor's choice

The Cookie Consent module stores the visitor's consent choice so that the banner does not need to appear on every page.

The stored information is used to determine how supported services should behave on subsequent visits.

The consent mechanism itself may require essential storage in order to remember this choice.

This type of storage is different from optional analytics tracking because it is required to remember the privacy preference selected by the visitor.

Changing a consent choice

Visitors should be able to change a previous consent decision.

The site can provide access to the consent settings so that someone who previously accepted can withdraw consent or someone who rejected can make a different choice.

When the choice changes, supported integrations such as Google Analytics are updated accordingly.

The exact appearance of the control depends on the Cookie Consent module and the active theme.

The Privacy Policy

The Cookie Consent module can create a Privacy Policy for the website.

The policy provides visitors with more information about how the website handles privacy, cookies and services such as Google Analytics.

The consent interface can link directly to this policy.

This means visitors can read more detailed information before or after making a consent choice.

Creating the Privacy Policy

When the Cookie Consent functionality is configured, Superlite can create the Privacy Policy page used by the module.

The page is stored as normal Superlite content, which means you can open it and review the text.

You should check the generated policy before relying on it.

A website owner may need to add information that is specific to the organization operating the site.

The Privacy Policy guide explains this in more detail.

Linking to the Privacy Policy

The consent banner includes a link to the website's Privacy Policy where configured.

The visitor can use this link to read more about the site's privacy practices and the services connected to the consent system.

Do not delete the Privacy Policy page while the Cookie Consent module links to it.

If you change its URL, make sure the module configuration and any relevant links continue to point to the correct page.

Cookie Consent and themes

The Cookie Consent module is intended to work independently of the active Superlite theme.

You should not need to manually add the consent banner to individual theme files.

This is important because changing theme should not remove the site's consent functionality.

The visual appearance of the consent interface can still be influenced by how the module and theme styles interact.

After changing theme, check that the consent banner remains readable and usable.

Testing the consent banner

After configuring the module, open the public website in a browser.

If the site uses Google Analytics and no consent decision has previously been stored, the consent interface should appear.

Test both available choices.

First reject analytics consent and confirm that the website itself continues to work normally.

Then test again with a fresh consent state and accept analytics.

You can use Google Analytics Realtime and Google Tag Assistant when checking the Analytics integration.

The banner does not appear

A missing consent banner does not necessarily mean that the module is broken.

First check whether the website actually has a supported service enabled that requires the consent interface.

For example, a Superlite installation without Google Analytics may not display a Cookie Consent banner because there is currently nothing for the visitor to consent to.

Also confirm that the Cookie Consent module is activated.

If Google Analytics should be active, check that the Google Analytics module is also activated and contains a valid Measurement ID.

Testing with an existing consent choice

If you have already accepted or rejected cookies during an earlier test, the banner may not appear again because your choice has been remembered.

Use the site's consent settings to change the choice where available.

For testing, you can also use a browser session where no previous consent choice has been stored.

This helps distinguish between a missing banner and a banner that is correctly respecting an earlier choice.

Testing Google Analytics after consent

If Google Analytics is enabled, test the relationship between Analytics and Cookie Consent.

Open the site without previously stored consent.

Before accepting analytics, check the site with Google Tag Assistant or the relevant browser tools.

Then accept consent and visit a few pages.

Open the Realtime report in Google Analytics and check whether your visit appears.

Tracking protection, browser privacy features and ad blockers can affect testing, so use them with care when diagnosing the integration.

Do not add Analytics manually

If you use the Superlite Google Analytics integration together with Cookie Consent, do not also paste Google Analytics code manually into the theme.

Superlite needs to know about the Analytics integration in order to manage consent correctly.

A manually inserted tracking script can run independently of the Cookie Consent module and defeat the purpose of the consent controls.

Keep the Analytics configuration in the appropriate Superlite module.

Disabling Cookie Consent

If the website no longer uses functionality that requires the Cookie Consent module, you can deactivate the module.

Before doing so, check which services are active on the site.

If Google Analytics or another supported tracking service remains enabled, removing the consent functionality may change how that service behaves.

Review the website configuration rather than treating Cookie Consent as an isolated visual feature.

After changing analytics settings

If you add or remove Google Analytics, review the Cookie Consent configuration as well.

The need for a consent banner can change when the services used by the website change.

After making changes, rebuild the site where necessary and test the public website in a browser.

This is especially important when moving a configuration between different Superlite websites because one site may use Google Analytics while another does not.