Compliant with GDPR, CCPA, COPPA, LGPD, PECR, PDPA, PIPEDA, and more.
Consent DB allows you to log, store, and query consent records in real time. When enabled, every consent event is recorded with the user's UUID, consent string, IP address, and optional identity mappings.
Consent DB is only available to Enterprise accounts. Please contact support@uniconsent.com to enable it.
The Consent DB uses a data layer pattern similar to Google Tag Manager's dataLayer. You can push data to window._unicData at any time — before or after the CMP script loads.
<script>
window._unicData = window._unicData || [];
</script>
Link user identities (e.g. after login) to the consent UUID. These IDs will be included in all subsequent consent log events.
window._unicData = window._unicData || [];
_unicData.push({
user_ids: {
auth_uid: 'user_12345',
email_hash: 'sha256_of_email'
}
});
You can push multiple times — user IDs are merged:
_unicData.push({ user_ids: { auth_uid: 'user_12345' } });
_unicData.push({ user_ids: { loyalty_id: 'LY9876' } });
// Result: { auth_uid: 'user_12345', loyalty_id: 'LY9876' }
To immediately send an identity event linking user IDs to the consent UUID without waiting for a consent action:
_unicData.push({
event: 'send_identity',
user_ids: {
auth_uid: 'user_12345'
}
});
The following system default ID types are available:
auth_uid — Authenticated user IDemail — Email addressemail_hash — Hashed email addressphone — Phone numberphone_hash — Hashed phone numbercustomer_id — Customer IDcrm_id — CRM IDYou can also define custom ID types in the dashboard under Consent Logs > Search > Settings (gear icon).
You can retrieve the consent UUID from the user's local storage key __unid, or via the JavaScript API:
__unicapi('getConsentId', 2, (consentId) => {
console.log(consentId);
});
When Consent DB is enabled, a Consent Logs page appears in the sidebar under Consent Data. The dashboard provides:
auth_uid)Enter the consent UUID in the UUID search field to find all consent records for a specific device or browser.
Select an ID type (e.g. auth_uid) and enter the ID value to find all consent records across devices linked to that identity.
Contact us: support@uniconsent.com