Skip to content

Instantly share code, notes, and snippets.

@piatra
Created July 17, 2020 10:43
Show Gist options
  • Save piatra/1adf21916bdc5b015e6fdac23ae9aa38 to your computer and use it in GitHub Desktop.
Save piatra/1adf21916bdc5b015e6fdac23ae9aa38 to your computer and use it in GitHub Desktop.
Some comments about the targeting:
1. WNP_MOMENTS_MOBILE
* firefox version 70+ (70 _or more_)
* tier 1 and 14 days old profile
* isFxAEnabled && sync.mobileDevices == 0
* this isn't 100% correct
* it means: user did not turn of sync AND did not sync any mobile devices, BUT it doesn't check if the user is
signed in to FxA. This targeting expression includes both users logged in to FxA AND not logged in who do not
have a mobile device synced.
* I _think_ it should have included "is signed in to FxA"
2. WNP_MOMENTS_SYNC
* firefox version == 70 (only 70)
* tier 1 and 30 days old
* !usesFirefoxSync
* is not logged in to FxA
* again not 100% correct: this also includes users that have disabled Sync which "technically" are not signed in to sync
* I _think_ it should have included "isFxAEnabled" as well
{
"data": {
"id": "WNP_MOMENTS_MOBILE",
"content": {
"action": {
"id": "moments-wnp",
"data": {
"url": "https://www.mozilla.org/firefox/welcome/4/",
"expireDelta": 604800000
}
},
"category": "cfrFeatures",
"bucket_id": "WNP_MOMENTS_MOBILE"
},
"trigger": {
"id": "momentsUpdate"
},
"template": "update_action",
"targeting": "firefoxVersion >= 70 && localeLanguageCode in [\"en\",\"fr\",\"de\"] && ((currentDate|date - profileAgeCreated) / 86400000) > 14 && isFxAEnabled && sync.mobileDevices == 0",
"last_modified": 1574958274437
},
"permissions": {
"write": [
"ldap:[email protected]"
]
}
}
{
"data": {
"id": "WNP_MOMENTS_SYNC",
"content": {
"action": {
"id": "moments-wnp",
"data": {
"url": "https://www.mozilla.org/firefox/welcome/3/",
"expireDelta": 604800000
}
},
"category": "cfrFeatures",
"bucket_id": "WNP_MOMENTS_SYNC"
},
"trigger": {
"id": "momentsUpdate"
},
"template": "update_action",
"targeting": "firefoxVersion == 70 && localeLanguageCode in [\"en\",\"fr\",\"de\"] && ((currentDate|date - profileAgeCreated) / 86400000) > 30 && !usesFirefoxSync",
"last_modified": 1574285705263
},
"permissions": {
"write": [
"ldap:[email protected]"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment