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
Comments
Comment #2
anybody@Schoenef Thanks! Are you a developer? If yes, could you perhaps have a deeper look at the actual values provided in cookies_matomo_page_attachments vs. the handled keys?
I guess that would be helpful. Perhaps there was a change in the matomo module?
Once we know the issue, we should add a test that if consent is required, the scripts are never present!
Comment #3
anybodyComment #4
schoenef commentedOk, I'll have a look on monday :)
Comment #5
anybody@Schoenef ping :) Wednesday :P
Comment #6
schoenef commentedJea, tell me about it ;) - so I looked again into the issue, but it magically disappeared...
Looks like it works exactly as it should, I think we can close this one.
Thx a lot!
Comment #7
anybodyThx @Schoenef whao, no idea, perhaps it was fixed by one of the latest updates. Thank you!
Feel free to reopen with details, if it should happen again.
Comment #8
steffenrWe 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.
Comment #9
anybodyShould you have any ideas for the reasons, or even better a fix, please let us know.
Comment #10
steffenr@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..
Comment #11
anybodySmells like could be kind of a caching issue...
Comment #12
steffenrEven 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.
Comment #13
grevil commented