mozilla-mobile / fenix

⚠️ Fenix (Firefox for Android) moved to a new repository. It is now developed and maintained as part of: https://github.com/mozilla-mobile/firefox-android
https://github.com/mozilla-mobile/firefox-android
Mozilla Public License 2.0
6.47k stars 1.27k forks source link

Telemetry for Custom tabs #977

Closed bifleming closed 5 years ago

bifleming commented 5 years ago

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

What questions will you answer with this data?

Probes

Dependencies (Added by PM and Eng)

Acceptance Criteria (Added by PM)

┆Issue is synchronized with this Jira Task

sblatz commented 5 years ago

@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?

bbinto commented 5 years ago

@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

@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

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

sblatz commented 5 years ago

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.

abodea commented 5 years ago

Hello, I'm still reproducing this issue for:

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

sblatz commented 5 years ago

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 commented 5 years ago

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

sblatz commented 5 years ago

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

sblatz commented 5 years ago

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!

abodea commented 5 years ago

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)