* For 11657: add LP attribute for tracking protection * For #11704: added tracking_protection_enabled attribute * Added docs for the new attributes, linking to data-review to the mma.md * Rename null to none when no ETP is enabledmaster
parent
057711e6fb
commit
fb1d7e12e6
|
@ -102,6 +102,15 @@ class LeanplumMetricsService(private val application: Application) : MetricsServ
|
||||||
|
|
||||||
val installedApps = MozillaProductDetector.getInstalledMozillaProducts(application)
|
val installedApps = MozillaProductDetector.getInstalledMozillaProducts(application)
|
||||||
|
|
||||||
|
val trackingProtection = application.settings().run {
|
||||||
|
when {
|
||||||
|
!shouldUseTrackingProtection -> "none"
|
||||||
|
useStandardTrackingProtection -> "standard"
|
||||||
|
useStrictTrackingProtection -> "strict"
|
||||||
|
else -> "custom"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Leanplum.start(application, hashMapOf(
|
Leanplum.start(application, hashMapOf(
|
||||||
"default_browser" to MozillaProductDetector.getMozillaBrowserDefault(application).orEmpty(),
|
"default_browser" to MozillaProductDetector.getMozillaBrowserDefault(application).orEmpty(),
|
||||||
"fennec_installed" to installedApps.contains(MozillaProducts.FIREFOX.productName),
|
"fennec_installed" to installedApps.contains(MozillaProducts.FIREFOX.productName),
|
||||||
|
@ -110,6 +119,8 @@ class LeanplumMetricsService(private val application: Application) : MetricsServ
|
||||||
"fxa_signed_in" to application.settings().fxaSignedIn,
|
"fxa_signed_in" to application.settings().fxaSignedIn,
|
||||||
"fxa_has_synced_items" to application.settings().fxaHasSyncedItems,
|
"fxa_has_synced_items" to application.settings().fxaHasSyncedItems,
|
||||||
"search_widget_installed" to application.settings().searchWidgetInstalled,
|
"search_widget_installed" to application.settings().searchWidgetInstalled,
|
||||||
|
"tracking_protection_enabled" to application.settings().shouldUseTrackingProtection,
|
||||||
|
"tracking_protection_setting" to trackingProtection,
|
||||||
"fenix" to true
|
"fenix" to true
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
10
docs/mma.md
10
docs/mma.md
|
@ -144,6 +144,16 @@ User Attributes
|
||||||
<td>A boolean indicating that the user has at least one search widget placed on the home screen</td>
|
<td>A boolean indicating that the user has at least one search widget placed on the home screen</td>
|
||||||
<td><a href="https://github.com/mozilla-mobile/fenix/pull/4694#issuecomment-520591275">#4694</a></td>
|
<td><a href="https://github.com/mozilla-mobile/fenix/pull/4694#issuecomment-520591275">#4694</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>`tracking_protection_enabled`</td>
|
||||||
|
<td>A boolean indicating that the user has enabled tracking protection</td>
|
||||||
|
<td><a href="https://github.com/mozilla-mobile/fenix/pull/11965#issuecomment-649731798">#11965</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>`tracking_protection_setting`</td>
|
||||||
|
<td>A string indicating the level at which the user has set tracking protection. Possible values are `none`, `standard`, `strict` and `custom`</td>
|
||||||
|
<td><a href="https://github.com/mozilla-mobile/fenix/pull/11965#issuecomment-649731798">#11965</a></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>`fenix`</td>
|
<td>`fenix`</td>
|
||||||
<td>A boolean indicating that this is a Fenix installation</td>
|
<td>A boolean indicating that this is a Fenix installation</td>
|
||||||
|
|
Loading…
Reference in New Issue