c15t

c15t is the open standard for cookie banners.

Automatically checked · GitHub checked 2026-11-13

c15t

Overview

c15t: the open standard for cookie banners

Latest NPM Version Stars License Discord Skills Made by Inth

c15t is the open standard for cookie banners. It's an open-source cookie consent manager and consent management platform (CMP) for JavaScript. You get a GDPR cookie banner, a preference dialog, and consent-gated scripts for React, Next.js, Vue, Nuxt, Svelte, Astro, TanStack Start, and plain HTML. Google Consent Mode v2 works through @c15t/integrations, and IAB TCF through an optional add-on.

c15t is used by 2,100+ sites, including expo.dev, zed.dev, unkey.dev, mintlify.com, and sazabi.com.

Docs · Sign up for Inth · Discord

Why c15t

  • Consent lives in your code. The banner ships in your bundle and renders with your app, not from a third-party snippet that loads after your page.
  • Analytics, ads, and pixels follow each visitor's choice. Ready-made loaders cover 40+ vendors, such as Google Tag Manager, GA4, Meta Pixel, and PostHog.
  • One setup for every region. Policies decide who sees a banner: opt-in for visitors in the EU, opt-out for some US states, or rules that you write.
  • Server-rendered pages can ship the banner in the first HTML. Next.js, Nuxt, Astro, TanStack Start, and SvelteKit resolve each visitor's policy on the server, so the banner does not wait for a request from the browser.
  • Standards built in: Google Consent Mode v2, IAB TCF 2.4, IAB GPP, and Global Privacy Control.
  • Your design or ours. Use the prebuilt components with a theme system, or build your own UI on headless hooks and composables.
  • Consent records with no server to run. Inth stores each choice with its region and policy version, and gives you a dashboard to manage policies.

Get started

The fastest way to set up c15t, for you or your coding agent:

npx @inth/cli c15t

The Inth CLI signs you in to Inth, creates or picks a project, and sets up c15t in your app. Then pick how. A coding agent fits c15t to your layout and moves your analytics behind consent. inth c15t scaffold writes your framework's quickstart files instead. Add --claude, --codex, --cursor, or --grok to go straight to that agent.

Supported Frameworks

FrameworkInstallImport fromQuickstart
React 18 and 19 (Vite, React Router)c15tc15t/reactReact
Next.js 15 and 16 (App Router, Pages Router)c15tc15t/nextNext.js
Vue 3c15tc15t/vue/vue-pluginVue
Nuxt 3 and 4c15tc15t/vue (Nuxt module)Nuxt
Astro 5, 6, and 7c15tc15t/astroAstro
TanStack Startc15tc15t/tanstack-startTanStack Start
Svelte 5 and SvelteKitc15tc15t/svelteSvelte, SvelteKit
JavaScript, headlessc15tc15t, c15t/runtimeHeadless runtime
Script tag, no build step (Webflow, WordPress, Framer, Squarespace)@c15t/browser<script> from a CDNHTML

Run c15t on Inth

c15t needs a backend to serve policies and keep consent records. Inth runs it for you, and adds the tools you need once someone asks you to prove consent:

  • Consent records. Every choice is stored with its region and policy version, so you can show what each visitor agreed to.
  • Website audit. Catches scripts and vendors that appear on your live site.
  • Code audit. Checks each pull request for privacy risk.
  • Policy packs. Managed consent rules for each region on Pro and above, so a new privacy law doesn't mean a redeploy.
  • Inth Agent. Ask what changed and follow the answer to its source.

You don't run the consent database, geo lookups, uptime, or upgrades. Inth's SOC 2 Type 2 report answers procurement questions.

Sign-up is free. Run npx @inth/cli c15t to create a project and set up c15t, or create one by hand and copy its backend URL. See pricing.

For development and tests, local mode keeps choices in the browser and keeps no consent records. Don't ship it to production. Its factory is local(). The old name, offline(), still works and goes away in v4.

Manual setup

A Next.js App Router app with the prebuilt banner, the preference dialog, and PostHog held until the visitor allows measurement. Install c15t and the vendor loaders:

pnpm add c15t @c15t/integrations

Create an Inth project and set NEXT_PUBLIC_C15T_BACKEND_URL to its backend URL in .env.local. Then add three files:

// next.config.ts
import { withConsentManifest } from 'c15t/next/build'
import type { NextConfig } from 'next'

const nextConfig = {} satisfies NextConfig

// Downloads your policy at build time and finds c15t.config.ts
export default withConsentManifest(nextConfig)
// c15t.config.ts
import { posthog } from '@c15t/integrations/posthog'
import { defineConsentConfig } from 'c15t/next'

export default defineConsentConfig({
  scripts: [
    posthog({
      id: 'phc_your_project_key',
      initOptions: { cookieless_mode: 'never' },
      loadMode: 'after-consent',
    }),
  ],
})
// app/layout.tsx
import {
  ConsentBanner,
  ConsentDialog,
  ConsentDialogLink,
  ConsentRoot,
} from 'c15t/next'
import { resolveConsent } from 'c15t/next/server'
import type { ReactNode } from 'react'

import './globals.css'

const RootLayout = ({ children }: { children: ReactNode }) => (
  <html lang="en">
    <body>
      {/* Not awaited: the page renders while consent resolves. */}
      <ConsentRoot state={resolveConsent()}>
        {children}
        <ConsentBanner />
        <ConsentDialog />
        <footer>
          <ConsentDialogLink>Privacy settings</ConsentDialogLink>
        </footer>
      </ConsentRoot>
    </body>
  </html>
)

export default RootLayout

The layout stays a Server Component. You write no 'use client' wrapper and need no c15t stylesheet import. The Next.js quickstart walks through each file. The quickstart for each other framework has the same example.

Integrations

@c15t/integrations has a loader for each vendor below. Most wait until the visitor allows the vendor's consent category. A few, such as Google Tag Manager and Mixpanel, load at once and pass the choice to the vendor's own consent API. The integrations overview shows what each loader does.

  • Web analytics: Plausible Analytics, Fathom Analytics, Umami Analytics, Vercel Analytics, Google Tag, Cloudflare Web Analytics, Matomo Analytics, Adobe Analytics, Ahrefs Analytics, Databuddy, Pirsch, Rybbit Analytics, OneDollarStats, Promptwatch, Statable
  • Product analytics: PostHog, Mixpanel, Amplitude, Heap, Gainsight PX, Pendo
  • Replay and monitoring: Microsoft Clarity, Hotjar, LogRocket, Sentry, Vercel Speed Insights, FullStory, Lucky Orange
  • Experimentation and personalization: Adobe Target, Appcues, Dynamic Yield, Optimizely Web Experimentation, Wisepops
  • Ads and growth: Meta Pixel, TikTok Pixel, Klaviyo, Clearbit, LinkedIn Insight Tag, Microsoft UET, Pinterest Tag, Reddit Pixel, Snapchat Pixel, X Pixel, OpenAI Pixel, ActiveCampaign, Attentive, Customer.io, Insider, Marketo Munchkin, Salesforce Account Engagement, Oracle Eloqua, HubSpot, RB2B, Clay, Default, Amazon Ads, AdRoll, LiveIntent, The Trade Desk, Vector
  • Data and tags: Segment, RudderStack, Hightouch, Google Tag Manager, Cloudflare Zaraz, Shopify
  • Chat and embeds: Intercom, Crisp, Front Chat, YouTube, Google Maps, Ada, Gorgias Chat, Zendesk Messaging

YouTube and Google Maps use consent-gated embeds with no extra package. The Default guide covers its Pixel and standalone Forms SDK, their configurable consent categories, and the Pixel's opt-in always mode.

Packages

PackageUse it forVersion
c15tThe package most apps install. The consent engine plus the React, Next.js, Vue, Nuxt, Astro, and TanStack Start adaptersnpm
@c15t/coreHeadless consent engine: policies, storage, and script gating. Also in c15tnpm
@c15t/reactReact 18 and 19 components and hooks. Also at c15t/reactnpm
@c15t/nextjsNext.js 15 and 16, App Router and Pages Router, with server rendering. Also at c15t/nextnpm
@c15t/vueVue 3 plugin and Nuxt 3 and 4 module. Also at c15t/vuenpm
@c15t/astroAstro 5, 6, and 7, with a banner that ships no framework JavaScript. Also at c15t/astronpm
@c15t/tanstack-startTanStack Start, with the banner in the first HTML. Also at c15t/tanstack-startnpm
@c15t/svelteSvelte 5 and SvelteKit through c15t/sveltenpm
@c15t/browserOne script tag for Webflow, WordPress, Framer, Squarespace, and plain HTMLnpm
@c15t/integrationsConsent-aware loaders for 40+ analytics, ad, chat, and monitoring vendorsnpm
@c15t/iabIAB TCF 2.4 and GPP for programmatic advertisingnpm
@c15t/translationsBanner and dialog text in 53 languagesnpm
@c15t/uiThe primitives, CSS, and theme tokens behind the c15t componentsnpm
@c15t/node-sdkRead and write consent records from your servernpm
@c15t/dev-toolsInspect consent state while you developnpm
@c15t/schemaValibot schemas and TypeScript types for the consent APInpm
@c15t/loggerThe structured logger that c15t packages usenpm

@c15t/scripts is deprecated. It re-exports @c15t/integrations for older imports and goes away in v4.

Docs for AI Agents

Every package that has docs ships them as Markdown, matched to the installed version. After you install c15t, point your coding agent at node_modules/c15t/AGENTS.md.

On the web, every page of the c15t docs has a Markdown version, and llms.txt lists them all. Install the c15t agent skills with npx skills add c15t/skills.

Talk

Watch the Next.js Conf 2025 talk: Why Your Consent Banner Should Be in Your Bundle.

Develop c15t

This repo uses Bun and Turborepo. AGENTS.md has the full command list.

bun install
bun run dev          # the demo app in apps/playground
bun run build        # every package
bun run test         # packages affected by your changes

Support

Contributing

Security

Do not open a public issue for a security vulnerability. Report it privately through GitHub's vulnerability reporting. We examine every valid report.

  • Do not share the vulnerability in public forums, issues, or pull requests
  • Give the steps to reproduce it and the versions it affects
  • Give us time to release a fix before you disclose it

License

Apache License 2.0


Built by Inth