8000 add pixel for fire button pressed (#617) · androiddev2019/Android@369aeb3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 369aeb3

Browse files
authored
add pixel for fire button pressed (duckduckgo#617)
1 parent 222b112 commit 369aeb3

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

app/src/main/java/com/duckduckgo/app/browser/BrowserActivity.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ class BrowserActivity : DuckDuckGoActivity(), CoroutineScope {
269269
}
270270

271271
fun launchFire() {
272+
pixel.fire(Pixel.PixelName.FORGET_ALL_PRESSED_BROWSING)
272273
val dialog = FireDialog(context = this, clearPersonalDataAction = clearPersonalDataAction)
273274
dialog.clearStarted = {
274275
removeObservers()

app/src/main/java/com/duckduckgo/app/statistics/pixels/Pixel.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ interface Pixel {
3232 enum class PixelName(val pixelName: String) {
3333

3434
APP_LAUNCH("ml"),
35+
36+
FORGET_ALL_PRESSED_BROWSING("mf_bp"),
37+
FORGET_ALL_PRESSED_TABSWITCHING("mf_tp"),
3538
FORGET_ALL_EXECUTED("mf"),
3639

3740
APPLICATION_CRASH("m_d_ac"),

app/src/main/java/com/duckduckgo/app/tabs/ui/TabSwitcherActivity.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import com.duckduckgo.app.global.view.ClearPersonalDataAction
3333
import com.duckduckgo.app.global.view.FireDialog
3434
import com.duckduckgo.app.settings.SettingsActivity
3535
import com.duckduckgo.app.statistics.VariantManager
36+
import com.duckduckgo.app.statistics.pixels.Pixel
3637
import com.duckduckgo.app.tabs.model.TabEntity
3738
import com.duckduckgo.app.tabs.ui.TabSwitcherViewModel.Command
3839
import com.duckduckgo.app.tabs.ui.TabSwitcherViewModel.Command.Close
@@ -63,6 +64,9 @@ class TabSwitcherActivity : DuckDuckGoActivity(), TabSwitcherListener, Coroutine
6364
@Inject
6465
lateinit var webViewPreviewPersister: WebViewPreviewPersister
6566

67+
@Inject
68+
lateinit var pixel: Pixel
69+
6670
private val viewModel: TabSwitcherViewModel by bindViewModel()
6771

6872
private val tabsAdapter: TabSwitcherAdapter by lazy { TabSwitcherAdapter(this, webViewPreviewPersister) }
@@ -165,6 +169,7 @@ class TabSwitcherActivity : DuckDuckGoActivity(), TabSwitcherListener, Coroutine
165169
}
166170

167171
private fun onFire() {
172+
pixel.fire(Pixel.PixelName.FORGET_ALL_PRESSED_TABSWITCHING)
168173
val dialog = FireDialog(context = this, clearPersonalDataAction = clearPersonalDataAction)
169174
dialog.clearComplete = { viewModel.onClearComplete() }
170175
dialog.show()

0 commit comments

Comments
 (0)
0