A simple solution to request consent from a user to use analytics for pageviews only (without using cookies).
npm install cookieless-analytics-consentNextJsGaPageviews` - Google Analytics integration for NextJs with storage none and ip anonymisation to track pageviews.
- `CookieGuard` - Cookie guard to remember whether a user has accepted or rejected a consent.
- `SimpleConsent` - A simple small ui component with a title, text and a reject and accept button. Its displayed by default on the bottom right.
Getting Started
`
npm i --save cookieless-analytics-consent
`
Documentation
Have a look at the example!
`
{(includeAnalytics) => (
{(onAccept, onReject) => (
title: 'Web analysis',
text: ,
buttonRejectText: 'No thanks',
buttonAcceptText: 'Accept',
}} />
)}
)}
`
If you want your own ui component, then just replace `SimpleConsent`` with another one.