Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Telemetry for Custom tabs #977

Closed
bifleming opened this issue Mar 12, 2019 · 9 comments
Closed

Telemetry for Custom tabs #977

bifleming opened this issue Mar 12, 2019 · 9 comments

Comments

@bifleming
Copy link

bifleming commented Mar 12, 2019

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

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

@sblatz
Copy link
Contributor

sblatz commented Apr 10, 2019

@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 sblatz added needs:product 🙅 waiting Issues that are blocked or has dependencies that are not ready and removed in progress labels Apr 10, 2019
@project-bot project-bot bot moved this from In Progress to Blocked in Fenix Sprint Kanban Apr 10, 2019
@bbinto
Copy link
Contributor

bbinto commented Apr 11, 2019

@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

@vesta0 vesta0 removed needs:product 🙅 waiting Issues that are blocked or has dependencies that are not ready labels Apr 11, 2019
@vesta0 vesta0 moved this from Blocked to In Progress in Fenix Sprint Kanban Apr 11, 2019
@sblatz sblatz added the 🙅 waiting Issues that are blocked or has dependencies that are not ready label Apr 15, 2019
@project-bot project-bot bot moved this from In Progress to Blocked in Fenix Sprint Kanban Apr 15, 2019
@sblatz
Copy link
Contributor

sblatz commented Apr 17, 2019

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 sblatz moved this from In Progress to Done in Fenix Sprint Kanban Apr 17, 2019
@sblatz sblatz reopened this Apr 17, 2019
@sblatz sblatz added the eng:qa:needed QA Needed label Apr 17, 2019
@project-bot project-bot bot moved this from Done to Ready for QA in Fenix Sprint Kanban Apr 17, 2019
@bifleming bifleming added the Release Blocker Blocks a Release label May 30, 2019
@abodea
Copy link
Member

abodea commented Jun 4, 2019

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 abodea removed the eng:qa:needed QA Needed label Jun 4, 2019
@project-bot project-bot bot moved this from Ready for QA to In Progress in Fenix Sprint Kanban Jun 4, 2019
@sblatz
Copy link
Contributor

sblatz commented Jun 4, 2019

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
Copy link
Contributor

sblatz commented Jun 4, 2019

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

@sblatz
Copy link
Contributor

sblatz commented Jun 4, 2019

I've opened a PR in a-c that will handle the share case: mozilla-mobile/android-components#3249

@sblatz
Copy link
Contributor

sblatz commented Jun 4, 2019

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 sblatz added eng:qa:needed QA Needed and removed in progress labels Jun 5, 2019
@project-bot project-bot bot moved this from In Progress to Ready for QA in Fenix Sprint Kanban Jun 5, 2019
@abodea
Copy link
Member

abodea commented Jun 11, 2019

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)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants