Troubleshooting
Fix common issues with missing CDRs, incomplete evidence, rendering problems, or SDK errors.
First checks
- Confirm the SDK is loaded:javascript
// In the browser console: window.ExpressConsent; window.ExpressConsent.version; - Confirm your handler awaits
captureCDR()before page navigation. - Confirm you’re looking in the right place: dashboard → Organization → Domain → CDRs.
SDK not loaded / undefined
- Script tag is missing or loads after your code runs
- CSP blocks the SDK
- Ad blockers/extensions block the script (test in a clean browser profile)
CSP
If your site uses a strict Content Security Policy, allow the ExpressConsent SDK and any resources (fonts, styles) your page needs for accurate rendering.
CDR never appears
- Page navigates before
captureCDR()resolves - Handler throws and exits early (wrap in try/catch)
- SPA routing unmounts the form immediately
Recommended pattern:
javascript
document.getElementById("consentForm")?.addEventListener("submit", async (e) => {
e.preventDefault();
try {
const { cdrId } = await window.ExpressConsent.captureCDR();
console.log("Saved:", cdrId);
} catch (err) {
console.error("ExpressConsent capture failed:", err);
}
e.currentTarget.submit();
});Ensuring your page renders well in snapshots
ExpressConsent recreates your page from the captured state to produce the visual record. Follow these guidelines so the snapshot looks accurate and contains all critical consent elements.
Consent UI requirements
- Use standard HTML form controls for checkboxes, radio buttons, and inputs. Custom-drawn controls (canvas, WebGL, SVG-only toggles) may not appear correctly in the visual record.
- Checkbox must look checked. If you style checkboxes with CSS, ensure the checked state produces a visible tick or highlight in the HTML. The snapshot captures exactly what is in the page — a checked box must look checked.
- Input values must be in the page. Ensure form fields retain user-entered values at capture time. Some UI frameworks or masking libraries clear inputs on submit — if that happens, the values won’t appear in the evidence.
- TCPA/consent text must be real text. Use actual HTML text for legal disclaimers, not images. Text in images may not render clearly and cannot be verified programmatically.
- Show the full disclaimer. Avoid hiding consent language behind “Read more” links or collapsed accordions. If the text isn’t visible at capture time, it won’t appear in the snapshot.
Things that hurt snapshot fidelity
- Cross-origin iframes: content inside cross-origin iframes appears blank in the visual record. Move consent UI into the top-level page, or load the SDK inside the iframe separately. Same-origin iframes generally work.
- Animations on consent elements: fade-ins, transitions, or loading spinners on the consent checkbox or disclaimer can cause those elements to appear semi-transparent or missing. Keep consent elements static.
- Late-injected content: consent text loaded asynchronously (e.g. fetched from an API on submit) may not be present at capture time. Render consent content upfront.
- Lazy-loaded assets: don’t use
loading="lazy"on images or styles that are part of the consent section. Load them normally so they’re available at capture time. - Overlays and spinners: if your submit handler shows a loading spinner or overlay immediately, it may cover the consent form in the snapshot. Capture before showing any overlay.
Responsive design
- Mobile must show full consent text. If your mobile CSS hides, truncates, or collapses the disclaimer (e.g.
display: noneon smaller screens), the snapshot will reflect that. Always display consent language regardless of viewport size. - Expandable sections: if your form uses accordions or tabs, ensure the consent section is expanded when the user submits. Consider programmatically expanding it when the checkbox is checked.
Fonts and styling
- CSP blocks remote fonts or stylesheets — allow them in your policy
- Font files on another domain need CORS headers
- Use
crossorigin="anonymous"on cross-domain stylesheet<link>tags so styles can be captured
Need help?
When contacting support, include:
- Your CID
- SDK version (
window.ExpressConsent.version) - Failing page URL (scrub PII from query params)
- Browser console errors
- A sample
cdrIdif available