1
0
Fork 0

For #4123: Adds telemetry for quick action open in app (#4629)

master
Sawyer Blatz 2019-08-09 13:51:12 -07:00 committed by GitHub
parent b24793d863
commit 0ec92d716f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 1 deletions

View File

@ -314,6 +314,17 @@ quick_action_sheet:
notification_emails:
- fenix-core@mozilla.com
expires: "2020-03-01"
open_app_tapped:
type: event
description: >
A user tapped the open in app button
bugs:
- 1195
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/4629
notification_emails:
- fenix-core@mozilla.com
expires: "2020-03-01"
metrics:
default_browser:

View File

@ -122,6 +122,9 @@ private val Event.wrapper
is Event.QuickActionSheetDownloadTapped -> EventWrapper<NoExtraKeys>(
{ QuickActionSheet.downloadTapped.record(it) }
)
is Event.QuickActionSheetOpenInAppTapped -> EventWrapper<NoExtraKeys>(
{ QuickActionSheet.openAppTapped.record(it) }
)
is Event.OpenedBookmarkInNewTab -> EventWrapper<NoExtraKeys>(
{ BookmarksManagement.openInNewTab.record(it) }
)

View File

@ -73,6 +73,7 @@ sealed class Event {
object QuickActionSheetShareTapped : Event()
object QuickActionSheetBookmarkTapped : Event()
object QuickActionSheetDownloadTapped : Event()
object QuickActionSheetOpenInAppTapped : Event()
object CustomTabsClosed : Event()
object CustomTabsActionTapped : Event()
object CustomTabsMenuOpened : Event()

View File

@ -53,6 +53,8 @@ class DefaultQuickActionSheetController(
}
override fun handleOpenLink() {
context.metrics.track(Event.QuickActionSheetOpenInAppTapped)
val getRedirect = appLinksUseCases.appLinkRedirect
val redirect = currentSession.let {
getRedirect.invoke(it.url)

View File

@ -205,7 +205,7 @@ object Deps {
const val robolectric = "org.robolectric:robolectric:${Versions.robolectric}"
const val fragment_testing = "androidx.fragment:fragment-testing:${Versions.androidx_fragment}"
const val androidx_junit = "androidx.test.ext:junit:${Versions.androidx_test_ext}"
const val androidx_test_core ="androidx.test:core:${Versions.androidx_testing}"
const val androidx_test_core = "androidx.test:core:${Versions.androidx_testing}"
const val fenix_megazord = "org.mozilla.appservices:fenix-megazord:${Versions.mozilla_appservices}"
const val fenix_megazord_forUnitTests = "org.mozilla.appservices:fenix-megazord-forUnitTests:${Versions.mozilla_appservices}"

View File

@ -314,6 +314,14 @@ tracking_protection</td>
<td></td>
<td>2020-03-01</td>
</tr>
<tr>
<td>open_app_tapped</td>
<td>event</td>
<td>A user tapped the open in app button</td>
<td><a href="https://github.com/mozilla-mobile/fenix/pull/4629">link</a></td>
<td></td>
<td>2020-03-01</td>
</tr>
</table>
</pre>