fenix icon indicating copy to clipboard operation
fenix copied to clipboard

Telemetry for Custom tabs

Open bifleming opened this issue 7 years ago • 9 comments

Similar to Custom Tabs events in Focus: https://github.com/mozilla-mobile/focus-android/blob/master/docs/Telemetry.md#custom-tabs

As a product owner, I want to track the usage of "find in page" in Fenix so that I can understand how our users leverage the feature, and detect anomalies or issues in user flow and usage.

Hypothesis

We believe this feature is useful to users, and successful when

  • % of users coming into Fenix via custom tabs increases

What questions will you answer with this data?

  • If the feature is usable and useful, how often to people come into Fenix via Custom tabs rather than other entry points. It'll help us to add and improve functionality

Probes

  • see here: https://github.com/mozilla-mobile/focus-android/blob/master/docs/Telemetry.md#custom-tabs
  • also make sure to track this as a way of intent/coming into the app

Dependencies (Added by PM and Eng)

  • Glean SDK (Event ping)

Acceptance Criteria (Added by PM)

  • Event pings can be queried via re:dash
  • We are sending telemetry events for the actions listed in the requirements
  • We have documented the telemetry
  • We have asked a data steward to review the telemetry
  • NOT an AC: Data science to create dashboard or further graphs (this will be a separate issue, this issue is only about hooking up the events described and that they can be queried in re-dash)

┆Issue is synchronized with this Jira Task

bifleming avatar Mar 12 '19 22:03 bifleming

@bbinto, @vesta0 are we sure that the linked telemetry events are correct?

@pocmo brings up a good point--a custom tab is not part of the normal tab view, thus it doesn't matter which one is 'selected' or which tab # it is, right?

sblatz avatar Apr 10 '19 20:04 sblatz

@bbinto, @vesta0 are we sure that the linked telemetry events are correct? Could you elaborate please what you event is in question?

The events listed for Focus are

  • Custom tab opened
  • "Close" button clicked
  • "Action" button clicked
  • Custom menu item selected

@sblatz - all I want to do here is to know/track when a user opens a link (from a different app) in Fenix by using the apps custom tabs implementation. The app, e.g LinkedIn can decide how to present the Chrome of Fenix. For Focus we were able to also keep track of these events,

The probe will help us to understand how many people come in from other apps via custom tabs and/or the regular intents.

Here two screenshots, one from the LinkedIn app (custom tab) vs. opened the link via the SMS app (not custom tab, opens link in default browser = Fenix)

custom_tab

no_custom_tab

So I'd like to track

  • Custom tab opened
  • "Close" button clicked (x button in the LinkedIn example)
  • "Action" button clicked (if share button available, when that's clicked)
  • Custom menu item selected (open the Fenix menu, where it says powered by Fenix).

Please ping me @sblatz if you want to chat. I hope that helped.

This is how it looks in Focus + LinkedIn article link

Screenshot_20190411-083310

bbinto avatar Apr 11 '19 12:04 bbinto

I'm updating the sizing of this as it actually required me to implement "fact emitting" on the a-c side and observe those in Fenix.

sblatz avatar Apr 17 '19 14:04 sblatz

Hello, I'm still reproducing this issue for:

  • "Action" button clicked (if share button available, when that's clicked)
  • Custom menu item selected (open the Fenix menu, where it says powered by Fenix). Mentioned in the comments above. Tested on the latest Fenix version from 6/4 with Samsung Galaxy Note 9(android 8.1.0).

Please note the following:

  • Custom tab opened ping was sent no issues. works ✅ app_opened_logcat

  • "Close" button clicked when I closed it from gmail and (x button in the LinkedIn example) works ✅ app_closed_logcat

  • "Action" button clicked - no matter how many times I tried the ping was not sent and I received this I/glean/GleanDebugActivity: Setting debug config Configuration(serverEndpoint=https://incoming.telemetry.mozilla.org, userAgent=Glean/0.55.0 (Android), connectionTimeout=10000, readTimeout=30000, maxEvents=500, logPings=true, httpClient=mozilla.components.lib.fetch.httpurlconnection.HttpURLConnectionClient@4c07826, pingTag=ab-test-001vv, channel=release) D/glean/PingMaker: Collecting events D/glean/Glean: No content for ping 'PingType(name=events, includeClientId=true).name', therefore no ping queued. 2019-06-04 14:47:41.296 4833-4982/? D/ViewRootImpl@323e8ed[fenix]: dispatchAttachedToWindow Doesn't work ❌app_share_logcat

  • Custom menu item selected (open the Fenix menu, where it says powered by Fenix) - I tried to open the custom menu from Gmail, LinkedIn(custom tabs) and the ping wasn't sent I think is the same issue as above from Custom tab opened. Doesn't work ❌ app_custom_menu_item_selected_logcat.txt

I will remove the QA Needed based on my comment until the issue will be fixed.

abodea avatar Jun 04 '19 12:06 abodea

Did a bit of investigation. It looks like the custom tab facts are not firing properly from android components.

This means that these pairings never happen and our telemetry won't send.

sblatz avatar Jun 04 '19 16:06 sblatz

@abodea what app were you using to test the "action button"? Was it a share button or something else?

sblatz avatar Jun 04 '19 17:06 sblatz

I've opened a PR in a-c that will handle the share case: https://github.com/mozilla-mobile/android-components/pull/3249

sblatz avatar Jun 04 '19 17:06 sblatz

I synced up with @abodea who mentioned these steps:

I opened a custom tab from linkedin: Open Gmail Tap on the linkedin link -> custom tab opened -> A share button is available.

Based on this, the a-c PR I opened should fix the problem!

sblatz avatar Jun 04 '19 20:06 sblatz

Verified as fixed on the latest build from 6/11 with Samsung Galaxy Note 9(Android 8.1.). Please note that the remaining 2 Action button and Custom menu item are now properly displayed on the logs and glean dashboard. The events displayed without problems.

CUSTOM_TAB ### And here is the CUSTOM_TAB: { "events": [ { "timestamp": 0, "category": "events", "name": "app_opened", "extra": { "source": "CUSTOM_TAB" } }, { "timestamp": 911, "category": "custom_tab", "name": "menu" }, { "timestamp": 16884, "category": "custom_tab", "name": "closed" }
Action_Button ### And here is the Action Button: { "events": [ { "timestamp": 0, "category": "events", "name": "app_opened", "extra": { "source": "CUSTOM_TAB" } }, { "timestamp": 46128, "category": "custom_tab", "name": "action_button" } ],

download (12)

download (11)

abodea avatar Jun 11 '19 10:06 abodea