- Issue created by @Anybody
- π©πͺGermany jan kellermann
jan kellermann β made their first commit to this issueβs fork.
- π©πͺGermany jan kellermann
Thank you very much for this proposal.
I just generated a service for eTracker. I have no account and could only check if the scripts are blocked or loaded.
So please review and give feeback.
- π©πͺGermany Anybody Porta Westfalica
Thank you very very much @jan kellermann I'll do so asap! (Or ask a colleague)
- π©πͺGermany Anybody Porta Westfalica
Another feature that would make a lot of sense here would be to fall back to cookieless mode, if no consent is given. Is that possible technically?
Other services like Posthog allow the same now. So if not yet possible, it might be a general feature request for the library and the module.
- π©πͺGermany jan kellermann
How can we handle the cookie option? In Matomo for example you have just to push an option. This means nothing is blocked but the option for cookie is triggered by klaro. See this config (in callback_code):
https://git.drupalcode.org/project/klaro/-/blob/3.x/config/install/klaro...
- π©πͺGermany Anybody Porta Westfalica
Thanks for the nice example @jan kellermann!
In etracker it is
data-block-cookies="true"
(https://lsww.de/etracker/) - π©πͺGermany jan kellermann
Here is the documentation:
<script data-cookieconsent="ignore" type="text/javascript"> var _etrackerOnReady = typeof _etrackerOnReady === 'undefined' ? [] : _etrackerOnReady; function etrackerSetCookieConsent(e) { if (Cookiebot.consent.statistics) _etrackerOnReady.push(function(){ _etracker.enableCookies('mydomain.com') }); else _etrackerOnReady.push(function(){ _etracker.disableCookies('mydomain.com') }); }; window.addEventListener('CookiebotOnConsentReady', etrackerSetCookieConsent, false); </script>
We can use
_etrackerOnReady.push(function(){ _etracker.enableCookies('mydomain.com') });
or_etrackerOnReady.push(function(){ _etracker.enableCookies('mydomain.com') });
mydomain.com
then must be replaced.This could then something like this:
if (consent == true) { _etrackerOnReady.push(function(){ _etracker.enableCookies(window.location.hostname) }); } else { _etrackerOnReady.push(function(){ _etracker.enableCookies(window.location.hostname) }); }
- π©πͺGermany jan kellermann
@anybody We added now tweo services to eTracker:
If you want to track every visit and block only cookies, please use the
serviceetracker_cookies
. Please make sure that cookies are
deactivated in the eTracker settings. Klaro will activate the cookies after
consent.If you want block tracking before consent at all, activate the
serviceetracker
.We created a test-account for eTracker and tested both configs with success.
Please review / feedback. Thank you.