隐私合规广告实战
High Contrast
Dark Mode
Light Mode
Sepia
Forest
2 min read365 words

隐私合规广告实战

Cookie 消亡不是末日——First-Party Data 策略、Privacy Sandbox API、上下文定向,都是后隐私时代的可行替代方案。

后隐私时代广告技术栈

graph TB A[数据策略] --> B[第一方数据] A --> C[零方数据] A --> D[上下文定向] B --> B1[CRM 数据] B --> B2[网站行为] B --> B3[App 事件] C --> C1[问卷偏好] C --> C2[忠诚计划] D --> D1[页面内容] D --> D2[关键词] D --> D3[语义分析] B --> E[广告平台] C --> E D --> E style B fill:#c8e6c9,stroke:#43a047,stroke-width:2px style D fill:#e3f2fd,stroke:#1565c0,stroke-width:2px

隐私合规检查器

from dataclasses import dataclass
from enum import Enum
class Region(Enum):
EU = "eu"           # GDPR
US_CALIFORNIA = "us_ca"  # CCPA/CPRA
CHINA = "cn"        # PIPL
MALAYSIA = "my"     # PDPA
GLOBAL = "global"
class ConsentType(Enum):
ANALYTICS = "analytics"
MARKETING = "marketing"
PERSONALIZATION = "personalization"
FUNCTIONAL = "functional"
@dataclass
class UserConsent:
user_id: str
region: Region
consents: dict[ConsentType, bool]
consent_timestamp: str
ip_anonymized: bool = False
class PrivacyComplianceChecker:
"""广告隐私合规检查"""
# 各地区的合规要求
REQUIREMENTS = {
Region.EU: {
"consent_required": True,
"opt_in_default": False,     # 默认不同意
"data_retention_days": 730,
"right_to_delete": True,
"cookie_banner": True,
"dpo_required": True,
},
Region.US_CALIFORNIA: {
"consent_required": True,
"opt_in_default": True,      # 默认同意,可 opt-out
"data_retention_days": None,
"right_to_delete": True,
"cookie_banner": True,
"dpo_required": False,
},
Region.CHINA: {
"consent_required": True,
"opt_in_default": False,
"data_retention_days": 1095,
"right_to_delete": True,
"cookie_banner": True,
"dpo_required": True,
},
Region.MALAYSIA: {
"consent_required": True,
"opt_in_default": False,
"data_retention_days": None,
"right_to_delete": True,
"cookie_banner": True,
"dpo_required": False,
},
}
def can_track(self, consent: UserConsent, purpose: ConsentType) -> dict:
"""检查是否可以追踪"""
reqs = self.REQUIREMENTS.get(consent.region, self.REQUIREMENTS[Region.EU])
has_consent = consent.consents.get(purpose, False)
# GDPR/PIPL: 未明确同意则不可追踪
if not reqs["opt_in_default"] and not has_consent:
return {
"allowed": False,
"reason": f"地区 {consent.region.value} 要求明确 opt-in",
}
# CCPA: 默认同意,除非用户 opt-out
if reqs["opt_in_default"]:
return {
"allowed": True,
"reason": "默认同意(opt-out 模式)",
}
return {
"allowed": has_consent,
"reason": "用户已授权" if has_consent else "用户未授权",
}
def audit_report(self, consents: list[UserConsent]) -> dict:
"""合规审计报告"""
total = len(consents)
marketing_opted_in = sum(
1 for c in consents
if c.consents.get(ConsentType.MARKETING, False)
)
return {
"total_users": total,
"marketing_opt_in": marketing_opted_in,
"opt_in_rate": f"{marketing_opted_in/total*100:.1f}%" if total > 0 else "0%",
"anonymized_ips": sum(1 for c in consents if c.ip_anonymized),
}
方案 原理 精准度 隐私安全 状态
FLoC/Topics API 浏览器端分组兴趣 Chrome Topics 推进中
第一方数据 CRM + 网站行为 已可用
上下文定向 页面内容匹配 已可用
数据清洁室 双方数据盲匹配 企业级
邮箱匹配 (UID2) 加密邮箱 ID 推进中
商户数据 购买历史直传 已可用

第一方数据策略

FIRST_PARTY_DATA_PLAYBOOK = {
"采集渠道": [
"网站注册/登录",
"邮件订阅",
"忠诚度计划",
"购买历史",
"App 事件",
"客服交互",
"线下活动",
],
"激活方式": [
"Custom Audiences 上传",
"Lookalike 拓展",
"邮件再营销",
"个性化推荐",
"CRM 广告定向",
],
"合规要点": [
"告知用途并获得同意",
"提供退出机制",
"加密传输和存储",
"定期清理过期数据",
"不与第三方共享原始数据",
],
}
def estimate_audience_size(
email_list: int,
match_rate: float = 0.55,
lookalike_multiplier: float = 10.0,
) -> dict:
"""估算可触达受众规模"""
matched = int(email_list * match_rate)
lookalike = int(matched * lookalike_multiplier)
return {
"邮件列表": email_list,
"平台匹配": f"{matched:,} (匹配率 {match_rate:.0%})",
"Lookalike 拓展": f"{lookalike:,}",
"总可触达": f"{matched + lookalike:,}",
}

本章小结

延伸阅读:广告生态与核心术语 | Pixel 与多触点归因