Compliant with GDPR, CCPA, COPPA, LGPD, PECR, PDPA, PIPEDA, and more.
同意日志记录(Consent DB)会记录用户的每一个同意事件,允许您通过 UUID 或用户身份查询和审计同意记录。本指南将引导您完成功能的启用和使用。
发布后,CMP 将自动开始向 Consent DB 发送同意事件。
要将同意记录与您的用户关联(例如登录后),请在页面中添加以下代码:
<script>
window._unicData = window._unicData || [];
_unicData.push({
user_ids: {
auth_uid: 'your_user_id'
}
});
</script>
此代码可以放置在页面的任何位置——CMP 脚本加载之前或之后均可。CMP 会获取用户 ID 并将其包含在同意事件中。
您可以包含多种身份类型:
_unicData.push({
user_ids: {
auth_uid: 'user_12345',
email_hash: 'sha256_hash_of_email',
customer_id: 'CUST-9876'
}
});
auth_uid)并输入值,以跨设备查找记录如果您使用系统默认值之外的身份类型,可以添加自定义类型:
loyalty_id)自定义 ID 类型将与系统默认值一起显示在搜索下拉菜单中。
<!-- 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 的项目配置_unicData.push() 设置的用户 ID 会被获取