Documentation

Live in one script tag.

Everything below is enough to add a working consent banner, record choices, and gate your scripts. The full reference lives in your dashboard once you have a key.

1. Add the script

Paste this into your <head>, before any analytics or marketing tags. Swap in the key from your dashboard.

<!-- loads first, blocks trackers until choice --> <script src="https://cdn.tacit.dev/v1/tacit.js" data-key="pk_live_yourkey" async></script>

2. Gate your scripts

Wrap anything that needs consent in a check. Tacit remembers the answer across pages and devices.

if (tacit.has('analytics')) { // safe to load analytics now loadAnalytics(); } // react to changes without a reload tacit.on('change', (state) => { if (!state.analytics) stopAnalytics(); });

3. Read the ledger

Pull consent records from the server with your secret key — never expose that key in the browser.

GET https://api.tacit.dev/v1/records?region=EU Authorization: Bearer sk_live_your_secret // → 200 OK { "records": [ { "subject":"usr_4b8", "scope":["analytics"], "event":"grant", "policy":"v3.1" } ] }

Common tasks

Framework guides

Dedicated setup notes for React, Vue, Next.js, and Google Tag Manager are in your dashboard under Docs → Integrations. Each is a copy-paste snippet plus a working example repo.

Looking for the full API reference, webhooks, and self-hosting notes? They unlock once you create an account and generate a key.

Get a key and try the snippet above.

The free tier is enough to wire up a real banner end to end.

Get your consent key