Cookie consent management cookiebot onetrust

From CraftOS-dev/craftbot-agent-bundles · View interactive version

Cookie consent management cookiebot onetrust is an AI agent skill from the GitHub repository CraftOS-dev/craftbot-agent-bundles. Set up cookie consent banners + Consent Management Platform (CMP) via Cookiebot, OneTrust, Iubenda Cookie Solution, Osano, or TrustArc. IAB TCF v2.2 + Google Consent Mode v2 + GPC signal compliance. Use when implementing GDPR / ePrivacy / CCPA cookie consent. Output is the embed snippet + cookie pol

How to use this skill

Skill file

Cookie Consent Management — Cookiebot / OneTrust / Iubenda / Osano / TrustArc

When to use

User says:

Companion skills:

Setup

Cookiebot (by Usercentrics)

# Sign up: https://www.cookiebot.com/
# Tiers (June 2026):
#   Free — single domain, <100 pages
#   Premium — €9-49/mo by domain size
#   Enterprise — multi-domain, custom

# Embed snippet:
# <script id="Cookiebot" src="https://consent.cookiebot.com/uc.js"
#         data-cbid="<DOMAIN_GROUP_ID>" type="text/javascript" async></script>

OneTrust

# Enterprise consent + privacy management
# https://www.onetrust.com/products/cookie-consent/
# Enterprise quote; not for solo founders typically

# Embed: dashboard generates script
# <script src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js"
#         data-domain-script="<UUID>"></script>

Iubenda Cookie Solution

# https://www.iubenda.com/en/cookie-solution
# Tiers — included in Iubenda Pro+ (€27+/mo)

# Embed: dashboard generates snippet (loads before other scripts)

Osano

# https://www.osano.com/
# Free tier available

# Embed:
# <script src="https://cmp.osano.com/<CMP_ID>/osano.js"></script>

TrustArc

# https://trustarc.com/
# Enterprise tier; ad-tech focused (IAB TCF leader)

Auth / API keys:

Common recipes

Recipe 1: Cookiebot — scan + categorize + embed

1. Sign up at https://manage.cookiebot.com
2. Add domain → run cookie scanner (crawls 100-500 pages).
3. Review detected cookies; recategorize if needed:
   - Necessary (no consent required)
   - Preferences
   - Statistics
   - Marketing
4. Configure banner: position, layout, color, language.
5. "Get script" → copy the <script> tag.
6. Paste in <head> of every page BEFORE any non-essential script.

The Cookiebot script auto-blocks non-necessary scripts until consent granted (script tag rewriting).

Recipe 2: Auto-blocking implementation

<!-- Cookiebot must load FIRST in <head> -->
<script id="Cookiebot" src="https://consent.cookiebot.com/uc.js"
        data-cbid="00000000-0000-0000-0000-000000000000"
        data-blockingmode="auto" type="text/javascript"></script>

<!-- Other scripts: change type attribute -->
<!-- BAD: <script src="https://analytics.example.com/script.js"></script> -->
<!-- GOOD: -->
<script type="text/plain" data-cookieconsent="statistics"
        src="https://analytics.example.com/script.js"></script>

Cookiebot rewrites type="text/plain" to active scripts only AFTER user consents to the listed category.

Recipe 3: Google Consent Mode v2 integration

<!-- Initialize Consent Mode BEFORE GTM -->
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('consent', 'default', {
  'ad_storage': 'denied',
  'ad_user_data': 'denied',
  'ad_personalization': 'denied',
  'analytics_storage': 'denied',
  'functionality_storage': 'granted',
  'personalization_storage': 'denied',
  'security_storage': 'granted',
  'wait_for_update': 500
});
</script>

<!-- Cookiebot will update consent state after user choice -->
<script id="Cookiebot" src="https://consent.cookiebot.com/uc.js"
        data-cbid="..." data-blockingmode="auto"></script>

<!-- GTM after Consent Mode -->
<script>
(function(w,d,s,l,i){...})(window,document,'script','dataLayer','GTM-XXXXX');
</script>

Google Consent Mode v2 required for EEA traffic to measure Google Ads conversions (since March 2024).

Recipe 4: IAB TCF v2.2 compliance (ad-tech sites)

1. Cookiebot / OneTrust / TrustArc dashboard → enable "IAB TCF v2.2"
2. Select Vendor List (IAB Global Vendor List — 1000+ vendors)
3. Map Purposes (1-11 in TCF v2.2):
   - Store info
   - Select basic ads
   - Personalised ads profile + selection
   - Personalised content profile + selection
   - Measure ad / content performance
   - Audience research
   - Develop + improve products
   - Use limited data to select content
   - etc.
4. Generate banner with full TCF UI (Purposes + Vendors + Special Features).
5. Test via IAB CMP Validator: https://cmpvalidator.iabtechlab.com/

Recipe 5: Global Privacy Control (GPC) signal handling

// Detect GPC signal (CCPA opt-out equivalent)
if (navigator.globalPrivacyControl) {
  // Treat as opt-out of sale/share
  gtag('consent', 'update', {
    'ad_storage': 'denied',
    'ad_user_data': 'denied'
  });
  // Send signal to CMP
  Cookiebot.renew(); // or equivalent
}

Required: CCPA / CPRA + CO + CT + several state privacy laws require GPC honor. Cookiebot, OneTrust, Iubenda CMPs handle this automatically; verify in your dashboard.

Recipe 6: Cookie Policy page (auto-generated)

Cookiebot / OneTrust / Iubenda dashboards → "Cookie Policy" tab → generates HTML / iframe
Embed at <yoursite>/cookies — link from privacy policy + footer + banner "Learn more."

Cookie Policy contents:
- What are cookies
- Categories (Necessary / Preferences / Statistics / Marketing)
- Detailed cookie list (auto-populated from scanner)
- How to manage / withdraw consent
- Third-party cookies notice
- Contact info

Recipe 7: Geo-targeting (banner only for EU + CA, etc.)

Cookiebot dashboard → "Behavior" → "Geo-IP targeting"
- EU only: banner shows for EU IPs
- US (CA / CO / VA / CT / etc.): different banner with "Do Not Sell or Share" link
- Rest of world: no banner OR informational only

Don't show a full consent banner for visitors NOT subject to ePrivacy / GDPR — adds friction without legal benefit. But for CCPA-applicable states (CA + others), the opt-out banner is required.

Recipe 8: Cookiebot REST API — list cookies / sites programmatically

curl -X GET https://api.cookiebot.com/v2/cookies \
  -H "X-API-Key: $COOKIEBOT_API_KEY" \
  -H "Accept: application/json"

Recipe 9: Banner copy + UX defaults (avoid dark patterns)

Banner buttons (best practice):
- "Accept All" + "Reject All" + "Cookie Settings" — three equal-weight buttons
- NOT "Accept All" + "Cookie Settings" with no reject
- NOT bury "Reject" in a sub-menu

CNIL (France DPA) enforcement focus: equal prominence for Accept vs Reject.
ICO (UK DPA): "Reject all" must be as easy as "Accept all."

Recipe 10: Consent record retention + audit log

GDPR Art. 7(1): controller must demonstrate consent.
Cookiebot / OneTrust / Iubenda dashboards record:
- Timestamp
- IP (hashed) or session ID
- Consent string (TCF format)
- Categories accepted
- Banner version

Export for audit: dashboard → Consent Records → CSV / API.

Examples

Example 1: B2B SaaS — Cookiebot setup

Goal: GDPR + CCPA-compliant cookie consent.

Steps:

  1. Sign up for Cookiebot (Recipe 1).
  2. Scan site; categorize cookies.
  3. Install snippet with auto-blocking (Recipe 2).
  4. Integrate Google Consent Mode v2 (Recipe 3) — required for Google Ads in EEA.
  5. Honor GPC signal (Recipe 5).
  6. Generate cookie policy (Recipe 6).
  7. Verify banner UX is balanced (Recipe 9).
  8. Test in EU + CA + US (non-applicable) browser geo-locations.
  9. Confirm consent log accessible (Recipe 10).

Result: Fully compliant cookie consent stack across major regulations.

Example 2: Ad-tech site — OneTrust + IAB TCF v2.2

Goal: Programmatic ad delivery while respecting TCF.

Steps:

  1. Sign up for OneTrust + select IAB TCF v2.2 mode.
  2. Configure Purposes + Vendor List.
  3. Test consent string generation.
  4. Validate at https://cmpvalidator.iabtechlab.com/
  5. Add disclaimer + verify IAB framework version (2.2 as of 2024-2026).

Result: Compliant ad-tech consent infrastructure.

Example 3: Switching from Cookiebot to Iubenda (or vice versa)

Goal: Migrate CMP without losing consent records.

Steps:

  1. Export consent log from old CMP (Recipe 10).
  2. Configure new CMP (e.g., Iubenda Cookie Solution — Recipe 1 of iubenda-termly-privacy-policy-generators).
  3. Replace embed snippet.
  4. Force re-consent (recommended for material UX change).
  5. Update privacy policy to reference new CMP.
  6. Test auto-blocking still works.

Result: Migration complete with continuous compliance.

Edge cases / gotchas

Warning: This is informational guidance from an AI agent. Always consult a licensed attorney in your jurisdiction before relying on cookie consent configuration for regulatory compliance.

Sources

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.