tl;dr:城市、地区、邮政编码、国家/地区是否应该有 sha256_ 前缀,我是否应该对它们进行哈希处理?
----详情 我想知道谷歌是否不认为城市、地区和邮政编码是敏感信息,或者文档不完整。从第二个例子来看,我什至不需要对街道地址进行哈希处理。但我相信我应该散列一切...... 【示例中使用smarty】
gtag('set', 'user_data', {
"sha256_email_address": "{hash('sha256', $order_info.email)}",
"address": {
"sha256_first_name": "{hash('sha256', $order_info.firstname)}",
"sha256_last_name": "{hash('sha256', $lastname)}",
"sha256_street": "{hash('sha256', $address)}",
"sha256_city":"{hash('sha256', $city)}",
"sha256_region":"{hash('sha256', $country)}",
"sha256_postal_code": "{hash('sha256', $zipcode)}",
"sha256_country": "{hash('sha256', $country)}"
}
});
**资源:** https://support.google.com/analytics/answer/14171598 https://developers.google.com/analytics/devguides/collection/ga4/uid-data
"sha256_city":"{hash('sha256', $city)}",
与
"city":"{hash('sha256', $city)}",
与
"city":"{$city}",
文档显示了这个清晰的示例(在 Node.js 中):
user_data: {
sha256_email_address: yourEmailSha256Variable,
sha256_phone_number: yourPhoneSha256Variable,
address: {
sha256_first_name: yourFirstNameSha256Variable,
sha256_last_name: yourLastNameSha256Variable,
sha256_street: yourStreetAddressSha256Variable,
city: yourCityVariable,
region: yourRegionVariable,
postal_code: yourPostalCodeVariable,
country: yourCountryVariable
}
}
所以你的问题的答案是:
"city":"{$city}"
https://developers.google.com/analytics/devguides/collection/ga4/uid-data?hl=en