mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-03 23:15:31 +00:00
[fenix] For https://github.com/mozilla-mobile/fenix/issues/969: Adds more telemetry for collections (https://github.com/mozilla-mobile/fenix/pull/4539)
This commit is contained in:
parent
4ad3e4088b
commit
e904bd867e
@ -1090,4 +1090,15 @@ collections:
|
|||||||
from_screen:
|
from_screen:
|
||||||
description: >
|
description: >
|
||||||
A string representing the screen from which the user pressed the save button.
|
A string representing the screen from which the user pressed the save button.
|
||||||
Either `browser` or `home`
|
Currently one of: `browserMenu`, `homeMenu` or `home`
|
||||||
|
rename_button:
|
||||||
|
type: event
|
||||||
|
description: >
|
||||||
|
A user pressed the "rename collection" button in the three dot menu
|
||||||
|
bugs:
|
||||||
|
- 969
|
||||||
|
data_reviews:
|
||||||
|
- https://github.com/mozilla-mobile/fenix/pull/4539
|
||||||
|
notification_emails:
|
||||||
|
- fenix-core@mozilla.com
|
||||||
|
expires: "2020-03-01"
|
@ -279,6 +279,9 @@ private val Event.wrapper
|
|||||||
is Event.CollectionAddTabPressed -> EventWrapper<NoExtraKeys>(
|
is Event.CollectionAddTabPressed -> EventWrapper<NoExtraKeys>(
|
||||||
{ Collections.addTabButton.record(it) }
|
{ Collections.addTabButton.record(it) }
|
||||||
)
|
)
|
||||||
|
is Event.CollectionRenamePressed -> EventWrapper<NoExtraKeys>(
|
||||||
|
{ Collections.renameButton.record(it) }
|
||||||
|
)
|
||||||
is Event.CollectionSaved -> EventWrapper(
|
is Event.CollectionSaved -> EventWrapper(
|
||||||
{ Collections.saved.record(it) },
|
{ Collections.saved.record(it) },
|
||||||
{ Collections.savedKeys.valueOf(it) }
|
{ Collections.savedKeys.valueOf(it) }
|
||||||
|
@ -110,6 +110,7 @@ sealed class Event {
|
|||||||
object CollectionTabSelectOpened : Event()
|
object CollectionTabSelectOpened : Event()
|
||||||
object CollectionTabLongPressed : Event()
|
object CollectionTabLongPressed : Event()
|
||||||
object CollectionAddTabPressed : Event()
|
object CollectionAddTabPressed : Event()
|
||||||
|
object CollectionRenamePressed : Event()
|
||||||
|
|
||||||
data class PreferenceToggled(val preferenceKey: String, val enabled: Boolean, val context: Context) : Event() {
|
data class PreferenceToggled(val preferenceKey: String, val enabled: Boolean, val context: Context) : Event() {
|
||||||
private val switchPreferenceTelemetryAllowList = listOf(
|
private val switchPreferenceTelemetryAllowList = listOf(
|
||||||
|
@ -122,7 +122,7 @@ class DefaultBrowserToolbarController(
|
|||||||
}
|
}
|
||||||
ToolbarMenu.Item.SaveToCollection -> {
|
ToolbarMenu.Item.SaveToCollection -> {
|
||||||
context.components.analytics.metrics
|
context.components.analytics.metrics
|
||||||
.track(Event.CollectionSaveButtonPressed(TELEMETRY_BROWSER_IDENITIFIER))
|
.track(Event.CollectionSaveButtonPressed(TELEMETRY_BROWSER_IDENTIFIER))
|
||||||
currentSession.let {
|
currentSession.let {
|
||||||
val tab = it.toTab(context)
|
val tab = it.toTab(context)
|
||||||
viewModel.tabs = listOf(tab)
|
viewModel.tabs = listOf(tab)
|
||||||
@ -188,6 +188,6 @@ class DefaultBrowserToolbarController(
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val TELEMETRY_BROWSER_IDENITIFIER = "browser"
|
private const val TELEMETRY_BROWSER_IDENTIFIER = "browserMenu"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -472,6 +472,7 @@ class HomeFragment : Fragment(), AccountObserver {
|
|||||||
selectedTabCollection = action.collection,
|
selectedTabCollection = action.collection,
|
||||||
step = SaveCollectionStep.RenameCollection
|
step = SaveCollectionStep.RenameCollection
|
||||||
)
|
)
|
||||||
|
requireComponents.analytics.metrics.track(Event.CollectionRenamePressed)
|
||||||
}
|
}
|
||||||
is CollectionAction.OpenTab -> {
|
is CollectionAction.OpenTab -> {
|
||||||
invokePendingDeleteJobs()
|
invokePendingDeleteJobs()
|
||||||
|
@ -23,14 +23,14 @@ class SaveTabGroupViewHolder(
|
|||||||
init {
|
init {
|
||||||
view.save_tab_group_button.setOnClickListener {
|
view.save_tab_group_button.setOnClickListener {
|
||||||
view.context.components.analytics.metrics
|
view.context.components.analytics.metrics
|
||||||
.track(Event.CollectionSaveButtonPressed(TELEMETRY_HOME_IDENITIFIER))
|
.track(Event.CollectionSaveButtonPressed(TELEMETRY_HOME_IDENTIFIER))
|
||||||
|
|
||||||
actionEmitter.onNext(TabAction.SaveTabGroup(selectedTabSessionId = null))
|
actionEmitter.onNext(TabAction.SaveTabGroup(selectedTabSessionId = null))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val TELEMETRY_HOME_IDENITIFIER = "home"
|
const val TELEMETRY_HOME_IDENTIFIER = "home"
|
||||||
const val LAYOUT_ID = R.layout.save_tab_group_button
|
const val LAYOUT_ID = R.layout.save_tab_group_button
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,8 @@ import mozilla.components.browser.menu.BrowserMenu
|
|||||||
import mozilla.components.browser.menu.BrowserMenuBuilder
|
import mozilla.components.browser.menu.BrowserMenuBuilder
|
||||||
import mozilla.components.browser.menu.item.SimpleBrowserMenuItem
|
import mozilla.components.browser.menu.item.SimpleBrowserMenuItem
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
|
import org.mozilla.fenix.components.metrics.Event
|
||||||
|
import org.mozilla.fenix.ext.components
|
||||||
import org.mozilla.fenix.home.sessioncontrol.SessionControlAction
|
import org.mozilla.fenix.home.sessioncontrol.SessionControlAction
|
||||||
import org.mozilla.fenix.home.sessioncontrol.TabAction
|
import org.mozilla.fenix.home.sessioncontrol.TabAction
|
||||||
import org.mozilla.fenix.home.sessioncontrol.onNext
|
import org.mozilla.fenix.home.sessioncontrol.onNext
|
||||||
@ -29,11 +31,11 @@ class TabHeaderViewHolder(
|
|||||||
when (it) {
|
when (it) {
|
||||||
is TabHeaderMenu.Item.Share -> actionEmitter.onNext(TabAction.ShareTabs)
|
is TabHeaderMenu.Item.Share -> actionEmitter.onNext(TabAction.ShareTabs)
|
||||||
is TabHeaderMenu.Item.CloseAll -> actionEmitter.onNext(TabAction.CloseAll(isPrivate))
|
is TabHeaderMenu.Item.CloseAll -> actionEmitter.onNext(TabAction.CloseAll(isPrivate))
|
||||||
is TabHeaderMenu.Item.SaveToCollection -> actionEmitter.onNext(
|
is TabHeaderMenu.Item.SaveToCollection -> {
|
||||||
TabAction.SaveTabGroup(
|
actionEmitter.onNext(TabAction.SaveTabGroup(null))
|
||||||
null
|
view.context.components.analytics.metrics
|
||||||
)
|
.track(Event.CollectionSaveButtonPressed(TELEMETRY_HOME_MENU_IDENITIFIER))
|
||||||
)
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,6 +101,7 @@ class TabHeaderViewHolder(
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
const val TELEMETRY_HOME_MENU_IDENITIFIER = "homeMenu"
|
||||||
const val LAYOUT_ID = R.layout.tab_header
|
const val LAYOUT_ID = R.layout.tab_header
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -891,7 +891,7 @@ tabs_selected: The number of tabs added to the collection
|
|||||||
<tr>
|
<tr>
|
||||||
<td>add_tab_button</td>
|
<td>add_tab_button</td>
|
||||||
<td>event</td>
|
<td>event</td>
|
||||||
<td> A user tapped the "add tab" button in the three dot menu of collections</td>
|
<td>A user tapped the "add tab" button in the three dot menu of collections</td>
|
||||||
<td><a href="https://github.com/mozilla-mobile/fenix/pull/4358">link</a></td>
|
<td><a href="https://github.com/mozilla-mobile/fenix/pull/4358">link</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>2020-03-01</td>
|
<td>2020-03-01</td>
|
||||||
@ -899,7 +899,7 @@ tabs_selected: The number of tabs added to the collection
|
|||||||
<tr>
|
<tr>
|
||||||
<td>long_press</td>
|
<td>long_press</td>
|
||||||
<td>event</td>
|
<td>event</td>
|
||||||
<td> A user long pressed on a tab, triggering the collection creation screen</td>
|
<td>A user long pressed on a tab, triggering the collection creation screen</td>
|
||||||
<td><a href="https://github.com/mozilla-mobile/fenix/pull/4358">link</a></td>
|
<td><a href="https://github.com/mozilla-mobile/fenix/pull/4358">link</a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>2020-03-01</td>
|
<td>2020-03-01</td>
|
||||||
@ -914,6 +914,14 @@ tabs_selected: The number of tabs added to the collection
|
|||||||
</td>
|
</td>
|
||||||
<td>2020-03-01</td>
|
<td>2020-03-01</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>rename_button</td>
|
||||||
|
<td>event</td>
|
||||||
|
<td>A user pressed the "rename collection" button in the three dot menu</td>
|
||||||
|
<td><a href="https://github.com/mozilla-mobile/fenix/pull/4539">link</a></td>
|
||||||
|
<td></td>
|
||||||
|
<td>2020-03-01</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user