Getting Started
Add 1Consent to any website with a single script tag — no package installation required.
Create your app
Sign up at dashboard.1consent.app and create a new App in the dashboard.
Give it a name that matches your website (e.g. "My Website"). Configure your consent framework (GDPR, CCPA, or TCF v2.4) and add the services you use (Google Analytics, Meta Pixel, etc.).
Copy the script tag
Navigate to the Installation tab in your app settings. Copy the script snippet — it looks like this:
<script src="https://web.cmp.1consent.app/id/YOUR_APP_ID.js"></script>Replace YOUR_APP_ID with the App ID shown in the dashboard.
Add it to your site
Paste the script tag into the <head> of your website — before any third-party scripts.
<!DOCTYPE html>
<html>
<head>
<!-- 1Consent — must be first -->
<script src="https://web.cmp.1consent.app/id/YOUR_APP_ID.js"></script>
<!-- Your other scripts -->
<script src="https://www.googletagmanager.com/gtag/js?id=G-XXXXX"></script>
</head>
<body>
...
</body>
</html>Verify it works
Open your website in a browser. You should see the consent banner appear.
- Accept or reject consent to verify the banner flow
- Check the browser console — 1Consent logs initialization status
- Visit the Analytics tab in the dashboard to see consent events
Using WordPress or Next.js? Check the Integration Guides for platform-specific setup instructions.
How script blocking works
1Consent offers two approaches to block third-party scripts until consent is given:
Autoblocker (automatic)
The Autoblocker automatically detects and blocks known third-party scripts — no code changes required on your site. Enable it in the dashboard and 1Consent will intercept scripts at runtime based on pattern matching against a database of known services.
This is the recommended approach for most websites. It requires zero changes to your existing HTML.
Template blocking (manual)
For maximum control, wrap third-party scripts in <template> tags so 1Consent can block them until consent is granted:
<template data-1c-service-tag="google-analytics">
<script src="https://www.googletagmanager.com/gtag/js?id=G-XXXXX"></script>
</template>The data-1c-service-tag attribute must match a service tag configured in your dashboard.
Use template blocking when you need precise control over which elements are gated, or when dealing with scripts or resources that the Autoblocker doesn't recognise.
Next steps
- WordPress Integration — install the official plugin
- React Integration — use the
@1consent/reactpackage (works in Next.js, Vite, Remix, Astro) - Dashboard — configure services, categories, and themes