Consent-first analytics for React, Next.js, Vue, Nuxt, Svelte, SvelteKit, Solid, SolidStart, Angular, plain JavaScript and the server: one instance tracks to GA4, Google Tag Manager, Meta Pixel, TikTok Pixel, PostHog, Sentry and more, and loads each provider only once the visitor has agreed to its category.
Docs: consentlayer.nicolopadovan.com
pnpm add consentlayerpackages/consentlayer: the packageapps/docs: the docs site (Astro Starlight)apps/example-*: example applications for Next.js, Nuxt, SvelteKit, SolidStart and Angular, and one for the script tagdocs: maintainer notes: publishing and releases and the v1 spec
ConsentLayer has not been legally reviewed and is not legal advice. Whether your implementation complies with the law where you and your visitors are is your responsibility; see the legal notice.
AI tools were used to write this repository's code, tests and documentation. Every change goes through the same tests and CI checks before it is released.
MIT License · Contributing · Code of Conduct · Security · Support