nextjs-google-analytics
nextjs-google-analytics copied to clipboard
How do you use the Consent API?
Hi there!
I can see as per #367 you have enabled a consent API - there are no docs on your implementation of this.
Is this a function I can call from other code or am I supposed to use cookies? And if it is the latter - I assume that the basic way of implementing would be:
- If GA cookies do not exist, deny by default (as per GDPR)
- If user consents (or cookies are already set to allow) set GA cookies to allow
-
nextjs-google-analytics
then automatically picks that up and starts sending data back to Google.
I don't mind writing the docs if you can let me know how this works!