Make privacy telemetry keys consistent.

This commit is contained in:
Michael Kelly 2018-11-01 10:57:55 -07:00
Родитель a24b9362de
Коммит 9a5208a0c0
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 972176E09570E68A
2 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -158,12 +158,12 @@ Below is a sample ping for the `badge_toolbar_button` and `visit_supported_site`
- `'product_card'`: Sends the user to the product page for the given Product Card.
- `'system_notification'`: Sends the user to the product page for the Price Alert displayed in the notification.
- `'walmart_link'`: Sends the user to Walmart.
- `'do_not_track'`: 'true' if the user has requested not to be tracked by websites, content, or advertising; otherwise 'false'.
- `'privacy_dnt'`: 'true' if the user has requested not to be tracked by websites, content, or advertising; otherwise 'false'.
- `'privacy_tp'`: The user's tracking protection setting:
- `'always'`: Tracking Protection is on
- `'never'`: Tracking Protection is off
- `'private_browsing'`: Tracking Protection is on in private browsing windows only
- `'cookie_config'`: The user's cookie setting:
- `'privacy_cookie'`: The user's cookie setting:
- `'allow_all'`: Accept all cookies
- `'reject_all'`: Reject all cookies
- `'reject_third_party'`: Reject all third-party cookies

Просмотреть файл

@ -15,9 +15,9 @@ const CATEGORY = 'extension.price_alerts';
const DEFAULT_EXTRAS = [
'tracked_prods',
'do_not_track',
'privacy_dnt',
'privacy_tp',
'cookie_config',
'privacy_cookie',
];
const EVENTS = {
@ -177,9 +177,9 @@ export async function recordEvent(method, object, value, extraBase = {}) {
const extra = {
...extraBase,
tracked_prods: getAllProducts(store.getState()).length,
do_not_track: navigator.doNotTrack === '1',
privacy_dnt: navigator.doNotTrack === '1',
privacy_tp: (await browser.privacy.websites.trackingProtectionMode.get({})).value,
cookie_config: (await browser.privacy.websites.cookieConfig.get({})).value.behavior,
privacy_cookie: (await browser.privacy.websites.cookieConfig.get({})).value.behavior,
};
// Convert all extra key values to strings as required by event telemetry