Compliant with GDPR, CCPA, COPPA, LGPD, PECR, PDPA, PIPEDA, and more.
Consent Logging (Consent DB) records every consent event from your users, allowing you to query and audit consent records by UUID or user identity. This guide walks you through enabling and using the feature.
Once published, the CMP will automatically start sending consent events to the Consent DB.
To associate consent records with your users (e.g. after login), add the following code to your page:
<script>
window._unicData = window._unicData || [];
_unicData.push({
user_ids: {
auth_uid: 'your_user_id'
}
});
</script>
This code can be placed anywhere on the page — before or after the CMP script loads. The CMP will pick up the user IDs and include them in consent events.
You can include multiple identity types:
_unicData.push({
user_ids: {
auth_uid: 'user_12345',
email_hash: 'sha256_hash_of_email',
customer_id: 'CUST-9876'
}
});
auth_uid) and enter the value to find records across devicesIf you use identity types beyond the system defaults, you can add custom ones:
loyalty_id)Custom ID types will appear in the search dropdown alongside the system defaults.
<!-- UniConsent CMP tag (async) -->
<script async src='https://cmp.uniconsent.com/v2/YOUR_PROJECT_ID/cmp.js'></script>
<!-- Set user identity (works before CMP loads) -->
<script>
window._unicData = window._unicData || [];
// After user login, push their identity
function onUserLogin(userId, emailHash) {
_unicData.push({
user_ids: {
auth_uid: userId,
email_hash: emailHash
}
});
}
</script>
enable_consentdb enabled_unicData.push() are picked upContact us: support@uniconsent.com