Skip to content

Commit fe57cd6

Browse files
authored
Fix: Use the previous pixel to measure Duck.ai discovery in tab switcher (#6598)
Task/Issue URL: https://app.asana.com/1/137249556945/project/1202552961248957/task/1211066471579596?focus=true ### Description This PR changes the pixel sent when the Duck.ai toolbar button is clicked to `aichat_open_tab_switcher_fab`. ### Steps to test this PR - [ ] Go to the tab switcher - [ ] Tap on the Duck.ai button - [ ] Verify the `aichat_open_tab_switcher_fab` pixel is sent
1 parent fd4452a commit fe57cd6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ class TabSwitcherViewModel @Inject constructor(
589589
fun onDuckAIButtonClicked() {
590590
viewModelScope.launch {
591591
val params = duckChat.createWasUsedBeforePixelParams()
592-
pixel.fire(DuckChatPixelName.DUCK_CHAT_OPEN_NEW_TAB_MENU, parameters = params)
592+
pixel.fire(DuckChatPixelName.DUCK_CHAT_OPEN_TAB_SWITCHER_FAB, parameters = params)
593593

594594
duckChat.openDuckChat()
595595
}

app/src/test/java/com/duckduckgo/app/tabs/ui/TabSwitcherViewModelTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ class TabSwitcherViewModelTest {
845845

846846
testee.onDuckAIButtonClicked()
847847

848-
verify(mockPixel).fire(DuckChatPixelName.DUCK_CHAT_OPEN_NEW_TAB_MENU, mapOf("was_used_before" to "0"))
848+
verify(mockPixel).fire(DuckChatPixelName.DUCK_CHAT_OPEN_TAB_SWITCHER_FAB, mapOf("was_used_before" to "0"))
849849
verify(duckChatMock).openDuckChat()
850850
}
851851

@@ -855,7 +855,7 @@ class TabSwitcherViewModelTest {
855855

856856
testee.onDuckAIButtonClicked()
857857

858-
verify(mockPixel).fire(DuckChatPixelName.DUCK_CHAT_OPEN_NEW_TAB_MENU, mapOf("was_used_before" to "1"))
858+
verify(mockPixel).fire(DuckChatPixelName.DUCK_CHAT_OPEN_TAB_SWITCHER_FAB, mapOf("was_used_before" to "1"))
859859
verify(duckChatMock).openDuckChat()
860860
}
861861

0 commit comments

Comments
 (0)