[C] Consentify

Getting Started

Get up and running with Consentify in under 5 minutes.

1. Create an Account

Create an account at consentify.dev.

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 the snippet from your dashboard and add it before </body>. It uses your site's public token:

<script
  src="https://consentify.dev/widget.js"
  data-token="ct_YOUR_PUBLIC_TOKEN"
></script>

The widget auto-initializes and displays a consent banner. The legacy data-site-id="YOUR_SITE_ID" attribute still works for existing installs; prefer data-token for new sites. See Widget Configuration for customization options.

Option B: SDK (npm) — via CLI

The fastest path for any project using a bundler:

npx create-consentify@latest

The 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
// lib/consentify.ts
import { createConsentify } from '@consentify/core';

export const consentify = createConsentify({
  policy: { categories: ['analytics', 'marketing'] as const },
});
'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 banner component styled to your dashboard settings, plus a self-hosted @consentify/core instance with your categories baked in. You own the source code and can customize freely - no environment variables needed.

See 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.

Next Steps

On this page