Skip to main content

Test Your Consent Setup

Use this checklist before going live or after making changes to your consent configuration.

Pre-flight checklist

  • Embed script is in <head> with defer
  • Embed token matches your property
  • Domain is authorised in Property → Settings → Domains
  • Policy is published (not draft)
  • Banner layout selected and saved

Test 1: Banner appears for new visitors

  1. Open your site in a private/incognito window
  2. ✅ Banner should appear before any interaction
  3. ✅ Banner should render correctly on mobile (resize browser)

Test 2: Script blocking works

  1. Open DevTools → Network (keep it open before page load)
  2. Load your site in incognito
  3. ✅ Scripts marked with type="text/plain" should NOT appear in the Network tab
  4. Accept consent
  5. ✅ Blocked scripts should now load (appear in Network tab)

  1. Accept consent in incognito window
  2. DevTools → Application → Cookies → find cf_consent
  3. ✅ Cookie should exist with correct domain and 12-month expiry
  4. Reload the page
  5. ✅ Banner should NOT reappear

Test 4: Rejection works

  1. Open fresh incognito window
  2. Click Reject All
  3. cf_consent cookie should show all non-necessary categories as false
  4. ✅ Blocked scripts should NOT appear in DevTools → Network

Test 5: Preference Center

  1. Open Preference Center (click Customize or your footer "Cookie Settings" link)
  2. ✅ All categories should be shown with correct names and descriptions
  3. Toggle analytics off, save
  4. ✅ Analytics scripts should not load on reload

In DevTools Console:

window.dataLayer.filter(e => e[0] === 'consent')

✅ Should show: consent.default (denied) then consent.update (with user's choices)


Test 7: Evidence receipt created

  1. Make a consent decision
  2. Dashboard → Evidence → Receipts
  3. ✅ A new receipt should appear within 30 seconds

Common issues found in testing

IssueSolution
Banner not showingSee Banner Not Showing
Scripts not blockedSee Scripts Not Blocked
Consent Mode not updatingSee Consent Mode Issues