Bug 1834842 - integrate updated SERP telemetry with Remote Settings Client

fenix/124.1.0
sarah541 7 months ago committed by mergify[bot]
parent 8ed8e283ef
commit a38cb0b853

@ -347,7 +347,7 @@ android.applicationVariants.configureEach { variant ->
if (!isDebug) {
buildConfigField 'boolean', 'TELEMETRY', 'true'
} else {
buildConfigField 'boolean', 'TELEMETRY', 'true'
buildConfigField 'boolean', 'TELEMETRY', 'false'
}
def buildDate = Config.generateBuildDate()

@ -12,6 +12,9 @@ import androidx.appcompat.content.res.AppCompatResources.getDrawable
import androidx.core.content.ContextCompat
import androidx.core.graphics.drawable.toBitmap
import androidx.datastore.preferences.preferencesDataStore
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import mozilla.components.browser.domains.autocomplete.BaseDomainAutocompleteProvider
import mozilla.components.browser.domains.autocomplete.ShippedDomainsProvider
import mozilla.components.browser.engine.gecko.GeckoEngine
@ -309,11 +312,13 @@ class Core(
// Install the "icons" WebExtension to automatically load icons for every visited website.
icons.install(engine, this)
// Install the "ads" WebExtension to get the links in an partner page.
adsTelemetry.install(engine, this)
CoroutineScope(Dispatchers.Main).launch {
// Install the "ads" WebExtension to get the links in an partner page.
adsTelemetry.install(engine, this@apply, context.filesDir)
// Install the "cookies" WebExtension and tracks user interaction with SERPs.
searchTelemetry.install(engine, this)
// Install the "cookies" WebExtension and tracks user interaction with SERPs.
searchTelemetry.install(engine, this@apply, context.filesDir)
}
WebNotificationFeature(
context,

@ -4,7 +4,6 @@
package org.mozilla.fenix.components.metrics
import android.util.Log
import androidx.annotation.VisibleForTesting
import mozilla.components.browser.menu.facts.BrowserMenuFacts
import mozilla.components.browser.toolbar.facts.ToolbarFacts
@ -391,16 +390,13 @@ internal class ReleaseMetricController(
}
Component.FEATURE_SEARCH to AdsTelemetry.SERP_ADD_CLICKED -> {
Log.d("Sarah", "SERP_ADD_CLICKED")
BrowserSearch.adClicks[value!!].add()
track(Event.GrowthData.SerpAdClicked)
}
Component.FEATURE_SEARCH to AdsTelemetry.SERP_SHOWN_WITH_ADDS -> {
Log.d("Sarah", "SERP_SHOWN_WITH_ADDS")
BrowserSearch.withAds[value!!].add()
}
Component.FEATURE_SEARCH to InContentTelemetry.IN_CONTENT_SEARCH -> {
Log.d("Sarah", "IN_CONTENT_SEARCH")
BrowserSearch.inContent[value!!].add()
track(Event.GrowthData.UserActivated(fromSearch = true))
}

Loading…
Cancel
Save