YJDH-723 | Kesäseteli frontend: Add Matomo tracking & cookie consent to employer & youth UIs#3890
Conversation
|
YJDH-KESASETELI-API branch is deployed to platta: https://yjdh-kesaseteli-pr3890.api.dev.hel.ninja 🚀🚀🚀 |
|
HANDLER branch is deployed to platta: https://kesaseteli-handler-ui-pr3890.dev.hel.ninja 🚀🚀🚀 |
|
EMPLOYER branch is deployed to platta: https://kesaseteli-pr3890.dev.hel.ninja 🚀🚀🚀 |
|
YOUTH branch is deployed to platta: https://nuortenkesaseteli-pr3890.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://kesaseteli-handler-ui-pr3890.dev.hel.ninja 😆🎉🎉🎉 |
TestCafe result is success for https://kesaseteli-pr3890.dev.hel.ninja 😆🎉🎉🎉 |
TestCafe result is success for https://nuortenkesaseteli-pr3890.dev.hel.ninja 😆🎉🎉🎉 |
1a3d3a2 to
6a2b524
Compare
|
YJDH-KESASETELI-API branch is deployed to platta: https://yjdh-kesaseteli-pr3890.api.dev.hel.ninja 🚀🚀🚀 |
|
HANDLER branch is deployed to platta: https://kesaseteli-handler-ui-pr3890.dev.hel.ninja 🚀🚀🚀 |
|
EMPLOYER branch is deployed to platta: https://kesaseteli-pr3890.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://kesaseteli-handler-ui-pr3890.dev.hel.ninja 😆🎉🎉🎉 |
|
YOUTH branch is deployed to platta: https://nuortenkesaseteli-pr3890.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://kesaseteli-pr3890.dev.hel.ninja 😆🎉🎉🎉 |
TestCafe result is success for https://nuortenkesaseteli-pr3890.dev.hel.ninja 😆🎉🎉🎉 |
b369cd8 to
44e7dd6
Compare
|
YJDH-KESASETELI-API branch is deployed to platta: https://yjdh-kesaseteli-pr3890.api.dev.hel.ninja 🚀🚀🚀 |
|
HANDLER branch is deployed to platta: https://kesaseteli-handler-ui-pr3890.dev.hel.ninja 🚀🚀🚀 |
|
YOUTH branch is deployed to platta: https://nuortenkesaseteli-pr3890.dev.hel.ninja 🚀🚀🚀 |
|
EMPLOYER branch is deployed to platta: https://kesaseteli-pr3890.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://kesaseteli-handler-ui-pr3890.dev.hel.ninja 😆🎉🎉🎉 |
TestCafe result is success for https://nuortenkesaseteli-pr3890.dev.hel.ninja 😆🎉🎉🎉 |
TestCafe result is success for https://kesaseteli-pr3890.dev.hel.ninja 😆🎉🎉🎉 |
909118a to
11b5803
Compare
|
YJDH-KESASETELI-API branch is deployed to platta: https://yjdh-kesaseteli-pr3890.api.dev.hel.ninja 🚀🚀🚀 |
|
EMPLOYER branch is deployed to platta: https://kesaseteli-pr3890.dev.hel.ninja 🚀🚀🚀 |
|
HANDLER branch is deployed to platta: https://kesaseteli-handler-ui-pr3890.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://kesaseteli-handler-ui-pr3890.dev.hel.ninja 😆🎉🎉🎉 |
TestCafe result is success for https://kesaseteli-handler-ui-pr3890.dev.hel.ninja 😆🎉🎉🎉 |
TestCafe result is success for https://nuortenkesaseteli-pr3890.dev.hel.ninja 😆🎉🎉🎉 |
|
EMPLOYER branch is deployed to platta: https://kesaseteli-pr3890.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://kesaseteli-pr3890.dev.hel.ninja 😆🎉🎉🎉 |
|
Tests all passed in pipeline, the github integration just doesn't show them correctly: |
nikomakela
left a comment
There was a problem hiding this comment.
Some comments and ideas
frontend/kesaseteli/shared/src/components/cookieSettings/CookieSettings.tsx
Outdated
Show resolved
Hide resolved
frontend/kesaseteli/shared/src/components/cookieSettings/CookieSettings.tsx
Outdated
Show resolved
Hide resolved
frontend/kesaseteli/shared/src/components/cookieConsent/CookieConsent.tsx
Outdated
Show resolved
Hide resolved
nikomakela
left a comment
There was a problem hiding this comment.
Couple of notes which are some kind of personal preferences. The site name in cookie consent modal updates too late: it's always one change behind. Sure the language is not changed very often.
f4afed2 to
fee1769
Compare
|
YJDH-KESASETELI-API branch is deployed to platta: https://yjdh-kesaseteli-pr3890.api.dev.hel.ninja 🚀🚀🚀 |
|
HANDLER branch is deployed to platta: https://kesaseteli-handler-ui-pr3890.dev.hel.ninja 🚀🚀🚀 |
fee1769 to
01abf32
Compare
|
Rebased on current main to refresh pipeline run. |
|
NOTE: Matomo code is fetched before cookie consent modal is handled, but according to testing by another team member locally it only POSTs data to Matomo if consent to use Matomo cookie is given. So, looks like it should be working ok i.e. user should not be tracked with Matomo if they do not consent to being tracked with Matomo. |
|
YJDH-KESASETELI-API branch is deployed to platta: https://yjdh-kesaseteli-pr3890.api.dev.hel.ninja 🚀🚀🚀 |
|
HANDLER branch is deployed to platta: https://kesaseteli-handler-ui-pr3890.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://kesaseteli-handler-ui-pr3890.dev.hel.ninja 😆🎉🎉🎉 |
NOTE: - This implementation is quite similar to the one in Benefit. - This implementation will have to be drastically changed when upgrading to HDS v4 (As is evident from the work done on cookie consent in events-helsinki-monorepo in the last half a year). Add Matomo tracking support & cookie consent modal to employer and youth UIs in Kesäseteli. Add cookie-settings pages for modifying cookie consent after the fact. refs YJDH-723
01abf32 to
12bc202
Compare
|
YJDH-KESASETELI-API branch is deployed to platta: https://yjdh-kesaseteli-pr3890.api.dev.hel.ninja 🚀🚀🚀 |
|
|
EMPLOYER branch is deployed to platta: https://kesaseteli-pr3890.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://kesaseteli-pr3890.dev.hel.ninja 😆🎉🎉🎉 |
|
HANDLER branch is deployed to platta: https://kesaseteli-handler-ui-pr3890.dev.hel.ninja 🚀🚀🚀 |
|
YOUTH branch is deployed to platta: https://nuortenkesaseteli-pr3890.dev.hel.ninja 🚀🚀🚀 |
TestCafe result is success for https://kesaseteli-handler-ui-pr3890.dev.hel.ninja 😆🎉🎉🎉 |
TestCafe result is success for https://nuortenkesaseteli-pr3890.dev.hel.ninja 😆🎉🎉🎉 |



Description ✨
Kesäseteli frontend: Add Matomo tracking & cookie consent to employer & youth UIs.
Localizing siteName for HDS's CookieModal does not change the cookie, see:
document.cookie = cookie.serialize(name, value, options);called withsetNamedCookie(VERSION_COOKIE_NAME, String(CURRENT_VERSION), { ...defaultCookieSetOptions, ...controllerOptions });whereVERSION_COOKIE_NAME = 'city-of-helsinki-consent-version'in cookieStorageProxy.NOTE:
cookieDomainparameter of<CookieModal>and<CookiePage>is not used, nor is it used by Helsinki Benefit in YJDH monorepo currently. HDS v3.11.0 has logic related to thecookieDomainparameter. Cookie domain use could be added when e.g. refactoring/redoing this functionality when upgrading to HDS v4.Issues 🐛
YJDH-723
Testing ⚗️
Screenshots 📸
Small modal Finnish
Large modal Finnish
Additional notes 🗒️