Disclosure Tracking
Tag disclosure text in your HTML with data-ec-disclosure, then pass agreement status in captureCDR(). The SDK extracts the tagged text from the DOM and stores it alongside the CDR for programmatic verification.
ExpressConsent’s CDR certifies what the user saw at the moment of capture (via the visual snapshot). The Disclosures section reflects what your integration reported — it is not an ExpressConsent attestation of the disclosure’s existence, legality, or validity. Anyone reviewing the CDR can independently verify the disclosures by examining the visual snapshot.
How it works
- Tag disclosure text in HTML with
data-ec-disclosure="key". The value is a key that identifies the disclosure. - Pass agreement status in
captureCDR()via thedisclosuresparameter:{ "key": boolean }. - The SDK extracts the tagged text from the DOM and pairs it with the boolean to produce a
disclosuresarray in the CDR metadata.
Single disclosure
Tag the disclosure element and pass the agreement status:
<!-- Tag the disclosure text -->
<p data-ec-disclosure="sms">
By submitting this form, you consent to receive automated
SMS messages from Acme Corp. Message and data rates may apply.
You may revoke consent at any time by texting STOP.
</p>ExpressConsent.captureCDR({
disclosures: {
"sms": true // user agreed
}
})Multiple disclosures
Use different key values to distinguish disclosures on the same page. Each key maps to a data-ec-disclosure attribute value:
<!-- Multiple disclosures on one page -->
<p data-ec-disclosure="sms">
By submitting, you consent to receive SMS messages from Acme Corp...
</p>
<p data-ec-disclosure="email">
By checking this box, you agree to receive marketing emails...
</p>ExpressConsent.captureCDR({
disclosures: {
"sms": true, // agreed via form submission
"email": emailCheckbox.checked, // agreed via checkbox
}
})Validation and safety
- Non-boolean values in
disclosuresare skipped with a console warning.captureCDR()is never interrupted by invalid disclosure data. - Keys with no matching
data-ec-disclosureelement in the DOM are skipped. - Tagged elements not mentioned in
disclosuresare not captured. - Disclosure text is preserved up to 5,000 characters.
What gets stored
Each disclosure entry contains:
key— the identifier from thedata-ec-disclosureattribute value.language— the extracted text from the DOM element.agreed— the boolean you passed indisclosures.
Where it appears
The disclosures array appears in:
- GET /v1/cdrs/:cdrId API response
- Webhook
cdr.completedpayload - The CDR detail page in the dashboard
Example in API response
{
"disclosures": [
{
"key": "sms",
"language": "By submitting this form, you consent to receive automated SMS messages from Acme Corp...",
"agreed": true
},
{
"key": "email",
"language": "By checking this box, you agree to receive marketing emails...",
"agreed": false
}
]
}For lead buyers
Companies receiving CDRs via the share/claim flow can use the disclosures field to programmatically check what disclosure text was reported and whether the generating integration indicated agreement. For independent verification, examine the CDR’s visual snapshot — it shows exactly what the user saw at the moment of capture.
Legacy: Consent Language Detection (deprecated)
Older SDK versions used data-ec-consent-checkbox and data-ec-consent-text attributes with automatic TCPA keyword detection. This approach is deprecated. Existing integrations using these attributes continue to work, but new integrations should use data-ec-disclosure and the disclosures parameter.
<!-- DEPRECATED: old checkbox-based attributes -->
<input type="checkbox" data-ec-consent-checkbox="company-a" />
<p data-ec-consent-text="company-a">Disclosure text...</p>Legacy CDRs store data in the consentLanguage field (with language, source, and optional label). New CDRs using disclosure tracking store data in the disclosures field.