Matomo is tracking before consent

Created on 16 December 2022, almost 2 years ago
Updated 28 August 2024, 3 months ago

Problem/Motivation

We have cookies + matomo modules installed and configured the cookies matomo in a way, that the cosent is required (like the default)

The problem is, that the matoma script + matomo cookies are included even before the consent is given.

Steps to reproduce

Install Matomo
Install Cookies
Install Cookies Matomo

- configure matomo to require consent
- open the page and check, that the matomo script is included even before consent.

Proposed resolution

I don't understand the code fully, but I would say the cookies_matomo_page_attachments function is already trying to remove the matomo library. question is, why it is not happening.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Postponed: needs info

Version

1.2

Component

Submodule: cookies_matomo

Created by

🇩🇪Germany Schoenef Unna

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇩🇪Germany SteffenR Germany

    We have a similar problem. But in our case this is only happening on live/ staging system.
    Our local ddev environment is handling the consent/ rewriting done via cookies_matomo_page_attachments correctly.

    On our stage/ prod the cookies_matomo_page_attachments is not working for no reason.
    We also implemented a custom cookies service for matomo_tag_manager, which is working/ rewritten correctly using the same logic as cookies_matomo_page_attachments.

  • Status changed to Postponed: needs info 3 months ago
  • 🇩🇪Germany Anybody Porta Westfalica

    Should you have any ideas for the reasons, or even better a fix, please let us know.

  • 🇩🇪Germany SteffenR Germany

    @anybody: I do so. I'll have a closer look tomorrow and will run some tests on other machines. Hope we can reproduce the bug on another local environment to find a fix..

  • 🇩🇪Germany Anybody Porta Westfalica

    Smells like could be kind of a caching issue...

  • 🇩🇪Germany SteffenR Germany

    Even after clearing caches the problem still persists.
    It's kind of strange, since our custom cookie plugin is working without any problems and the hook_page_attachments is rewriting the code correctly.

Production build 0.71.5 2024