Getting Started
Get up and running with Consentify in under 5 minutes.
1. Create an Account
Sign up at consentify.dev using a magic link email, GitHub, or Google OAuth.
2. Create a Site
In the dashboard, click Add Site and enter your website name and domain. Three default consent categories are created automatically:
- Necessary (required)
- Analytics
- Marketing
You can customize categories, add new ones, or reorder them from the site settings page.
3. Choose Your Integration
Option A: Script Tag (Simplest)
Copy your site ID from the dashboard and add this script tag before </body>:
<script
src="https://consentify.dev/widget.js"
data-site-id="YOUR_SITE_ID"
></script>The widget auto-initializes and displays a consent banner. See Widget Configuration for customization options.
Option B: SDK (npm) — via CLI
The fastest path for any project using a bundler:
npx create-consentify@latestThe CLI asks for your framework, categories, mode, and optional Google Consent Mode v2 wiring, then scaffolds lib/consent.ts + a provider component. See create-consentify for flags.
Option B (manual): SDK (npm)
npm install @consentify/core @consentify/react @consentify/cloud// lib/consentify.ts
import { createConsentify } from '@consentify/core';
import { enableCloud } from '@consentify/cloud';
export const consentify = createConsentify({
policy: { categories: ['analytics', 'marketing'] as const },
});
enableCloud(consentify, {
siteId: process.env.NEXT_PUBLIC_CONSENTIFY_SITE_ID!,
apiKey: process.env.NEXT_PUBLIC_CONSENTIFY_API_KEY,
});'use client';
import { useConsentify } from '@consentify/react';
import { consentify } from '@/lib/consentify';
function ConsentBanner() {
const state = useConsentify(consentify);
if (state.decision === 'decided') return null;
return (
<div>
<button onClick={() => consentify.acceptAll()}>Accept All</button>
<button onClick={() => consentify.rejectAll()}>Reject All</button>
</div>
);
}See SDK Documentation for full details.
Option C: Shadcn Registry (Full UI Ownership)
Generate an API key in the dashboard, then run:
npx shadcn add "https://consentify.dev/api/v1/registry/consent-banner?siteId=YOUR_SITE_ID&token=YOUR_API_KEY"This installs a pre-configured banner component styled to your dashboard settings. You own the source code and can customize freely.
Add to your .env:
NEXT_PUBLIC_CONSENTIFY_SITE_ID=your-site-id
NEXT_PUBLIC_CONSENTIFY_API_KEY=ck_your_api_keySee Shadcn Registry for details.
4. View Analytics
Once visitors start interacting with the banner, you can view consent analytics in the dashboard - including accept/reject rates and daily trends.