Skip to content
This repository was archived by the owner on Aug 3, 2025. It is now read-only.
This repository was archived by the owner on Aug 3, 2025. It is now read-only.

How do you use the Consent API? #447

Description

@limegorilla

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions