Skip to content

Latest commit

 

History

History
 
 

gdpr-cookie-consent

GDPR Cookie Consent

Create a simple GDPR consent form. Till the user doesn't click on the Accept button, she will see a banner prompting to accept cookies.

Preview

Open this example on CodeSandbox:

Open in CodeSandbox

Example

Users will be presented with a GDPR consent form on every page app/root.tsx till they submit the accept button. Once they submit the consent form, a dummy tracking script at the app/root.tsx will start tracking the user's data (open the browser console too see the dummy tracking message).

If you want to reset the example delete the gdpr-consent cookie in the Application/cookies in the browser's developer tools.

The example is using Remix Cookie API.

Related Links