Troubleshooting
Fix common issues with missing CDRs, incomplete evidence, rendering problems, or SDK errors.
First checks
- Confirm your handler awaits
captureCDR()before page navigation. - Confirm you are looking under Domains → your domain → CDRs in the dashboard.
SDK not loaded
- Confirm the script tag is present.
- Confirm your Content Security Policy allows
sdk.expressconsent.com. - Test in a clean browser profile to rule out blockers and extensions.
- If the form is in an iframe, load the script inside that iframe.
The script has to be in the same document as the form. It reads the page it is loaded into and nothing else.
CDR never appears
- The page navigates before
captureCDR()resolves. - The handler throws and exits early.
- SPA routing unmounts the form immediately.
Use this pattern:
javascript
const form = document.getElementById("consentForm");
form?.addEventListener("submit", async (event) => {
event.preventDefault();
try {
const { cdrId } = await window.ExpressConsent.captureCDR();
console.log("Saved:", cdrId);
} catch (error) {
console.error("ExpressConsent capture failed:", error);
}
form.submit();
});Highlighting issues
Tag each submit control with data-ec-submit. The control must still be on the page when captureCDR() runs.
If the submit control is inside an iframe, load the SDK inside the iframe. The parent page cannot inspect a cross-origin iframe.
Ensuring your page renders well
Consent UI
- Use standard HTML controls for checkboxes, radio buttons, and inputs.
- Make checked states clearly visible.
- Keep entered values in the form until capture finishes.
- Use real HTML text for consent language, not an image.
- Keep the complete disclosure visible when the form is submitted.
Common rendering problems
- Cross-origin iframe content can appear blank. Put the consent form in the top-level page or load the SDK inside the iframe.
- Animations, overlays, and loading spinners can cover consent elements. Start them after capture.
- Content loaded late might not be present. Render consent language before submission.
- Lazy-loaded consent assets might be missing. Load them normally.
- Local assets are not reachable by the renderer. Use
inlineAssets: trueduring local development, or test on a public staging site.
Responsive design
- Show the full consent language at every viewport size.
- Keep accordions or tabs containing consent language open when the form is submitted.
Fonts and styles
- Allow remote fonts and stylesheets in your Content Security Policy.
- Add CORS headers to font files served from another domain.
- Use
crossorigin="anonymous"on cross-domain stylesheet links.
Need help?
When contacting support, include:
- Your organization ID (CID)
- The failing page URL, with personal data removed from query parameters
- Browser console errors
- A sample
cdrId, if available