Redacto Cookie Consent
Cookie Consent Integration Guide
Overview
Redacto’s Cookie Consent solution allows you to quickly add a compliant cookie banner and preference center to your website. Once you configure your domain inside the Redacto CMP, the platform generates a script tag unique to your domain, organization, and workspace.
Adding this script to your site automatically:
- Displays a cookie banner
- Manages user consent preferences
- Blocks non-essential cookies until consent
- Logs consent data into Redacto
- Ensures global compliance (GDPR, DPDP, CCPA, etc.)
1. Setting Up Cookie Consent in Redacto
Step 1 - Add Your Domain
Navigate to:
Console → Consent Management → Cookie Consent → Domains
Click Add Domain and enter:
- Domain URL (e.g.
https://yourwebsite.com) - Display Name
- Workspace
- Optional geolocation rules
Step 2 - Configure Your Banner
You can customize:
- Banner style (bar, modal, drawer)
- Colors and theme
- Button labels
- Categories (Essential, Analytics, Marketing, Functional, Custom)
Step 3 - Copy the Script
After saving, Redacto generates a script like:
<script src="https://cdn.redacto.io/dist/redacto.min.js?domain=https://redacto.ai&organisation_uuid=ORG_UUID&workspace_uuid=WORKSPACE_UUID"></script>This is the only script you need to add to your site.
2. Understanding the Script Tag
Full Example
<script src="https://cdn.redacto.io/dist/redacto.min.js?domain=https://yourdomain.com&organisation_uuid=ORG_UUID&workspace_uuid=WORKSPACE_UUID"></script>Parameters
| Parameter | Description |
|---|---|
domain | The domain where the script will run. Used for validation. |
organisation_uuid | Identifies your organization for consent logging. |
workspace_uuid | Links consent settings to the correct workspace. |
The script automatically:
- Loads and displays the cookie banner
- Handles Accept/Reject/Customize actions
- Blocks analytics/marketing cookies until allowed
- Stores preferences locally
- Syncs consent logs to Redacto
3. Website Integration (HTML)
Add the script before the closing </body> tag:
<body>
...
<script src="https://cdn.redacto.io/dist/redacto.min.js?domain=https://yourdomain.com&organisation_uuid=ORG_UUID&workspace_uuid=WORKSPACE_UUID"></script>
</body>The banner will begin working immediately.
4. WordPress Integration
Method 1 - Using “Insert Headers and Footers” Plugin (Recommended)
- Install the plugin Plugins → Add New → Search: “Insert Headers and Footers”
- Open Settings → Insert Headers and Footers
- Paste the script under Scripts in Header or Scripts in Footer:
<script src="https://cdn.redacto.io/dist/redacto.min.js?domain=https://yourdomain.com&organisation_uuid=ORG_UUID&workspace_uuid=WORKSPACE_UUID"></script>- Save.
Method 2 - Add Script to Theme Header
- Go to Appearance → Theme File Editor
- Open
header.php - Add before
</head>:
<script src="https://cdn.redacto.io/dist/redacto.min.js?domain=https://yourdomain.com&organisation_uuid=ORG_UUID&workspace_uuid=WORKSPACE_UUID"></script>5. Next.js Integration
Next.js App Router (app/layout.tsx)
app/layout.tsx)import Script from "next/script";
export default function RootLayout({ children }) {
return (
<html>
<body>
<Script
src="https://cdn.redacto.io/dist/redacto.min.js?domain=https://yourdomain.com&organisation_uuid=ORG_UUID&workspace_uuid=WORKSPACE_UUID"
strategy="beforeInteractive"
/>
{children}
</body>
</html>
);
}Next.js Pages Router (_app.js)
_app.js)<Script
src="https://cdn.redacto.io/dist/redacto.min.js?domain=https://yourdomain.com&organisation_uuid=ORG_UUID&workspace_uuid=WORKSPACE_UUID"
strategy="afterInteractive"
/>6. React / SPA Integration
Add to public/index.html
public/index.html<script src="https://cdn.redacto.io/dist/redacto.min.js?domain=https://yourdomain.com&organisation_uuid=ORG_UUID&workspace_uuid=WORKSPACE_UUID"></script>Or Load Dynamically in React
useEffect(() => {
const script = document.createElement("script");
script.src = "https://cdn.redacto.io/dist/redacto.min.js?domain=https://yourdomain.com&organisation_uuid=ORG_UUID&workspace_uuid=WORKSPACE_UUID";
document.body.appendChild(script);
}, []);8. Validating the Integration
After adding the script, verify:
- Banner shows on first page load
- Accept/Reject/Customize buttons work
- Consent logs appear in Redacto dashboard
- Analytics/Marketing cookies blocked until consent
- "Manage Preferences" opens correctly
9. Troubleshooting
| Issue | Cause | Fix |
|---|---|---|
| Banner not showing | Domain mismatch | Ensure domain= matches your site exactly |
| Consent not saving | Browser blocking cookies | Test in non-incognito |
| Script failing | Incorrect UUIDs | Regenerate script from console |
| WordPress not updating | Cache plugin | Clear WP + CDN cache |
10. Example Final Script
<script src="https://cdn.redacto.io/dist/redacto.min.js?domain=https://mywebsite.com&organisation_uuid=ORG_UUID&workspace_uuid=WORKSPACE_UUID"></script>Updated 7 days ago