Cookies consent dialog
We need to include a cookie consent dialog that says we need essential cookies and an “accept” box that they need to accept in order to proceed to Genesys, otherwise they can just close the page.
Sample dialog:
Note: Just use our regular styles and buttons
"Privacy statement" should link to /content/legal/privacy page.
Implementation
Add a (functional) <CookiePolicy
component to the main <App
.
The component will check if there is a cookie named COOKIECOOKIE
.
COOKIECOOKIE
cookie is an essential cookie that identifies that a user accepted the essential cookies.
If such cookie exists, then return null
(also in SSR). Any suggestions how we can identify robots?
If there is no such cookie, then the component returns a container div
. We will use setTimeout
on the client (with a timeout of XXXms
) and toggle the visibility of the dialog.
The dialog is centered in the page, displayed at the bottom of the page.
On I agree
Add the COOKIECOOKIE
cookie with value of new Date()
and set it to expire in 3 months.