Closed Bug 1409268 Opened 7 years ago Closed 7 years ago

PWA Badge and Onboarding - Add telemetry

Categories

(Firefox for Android Graveyard :: Web Apps (PWAs), enhancement, P1)

56 Branch
x86
macOS
enhancement

Tracking

(firefox58 fixed)

RESOLVED FIXED
Firefox 58
Tracking Status
firefox58 --- fixed

People

(Reporter: cnevinchen, Assigned: cnevinchen)

Details

(Whiteboard: [FNC][SPT58.3][INT][pwa-front-end] )

Attachments

(1 file)

We need telemetry for
1. Number of clicks on badge.
2. Number of clicks on pinned shortcut creation.
Please help add more if you think they are required.
3. Number of display for badge. (jcheng)
Whiteboard: [pwa-front-end]
Priority: -- → P1
Comment on attachment 8919981 [details]
Bug 1409268 - Add telemetry for pwa badge and oboarding usage.

https://reviewboard.mozilla.org/r/190928/#review197044

::: mobile/android/base/java/org/mozilla/gecko/toolbar/PwaConfirm.java:36
(Diff revision 2)
>      boolean isAnimating = false;
>  
>  
>      public static PwaConfirm show(Context context) {
> +
> +        Telemetry.sendUIEvent(TelemetryContract.Event.ACTION, TelemetryContract.Method.ACTIONBAR, "pwa_confirm_show");

Please avoid plain text in code. Move "pwa_confirm_xxx" to constant value for better trace/review process.
Attachment #8919981 - Flags: review?(max) → review-
Comment on attachment 8919981 [details]
Bug 1409268 - Add telemetry for pwa badge and oboarding usage.

https://reviewboard.mozilla.org/r/190928/#review197058

::: mobile/android/base/java/org/mozilla/gecko/util/ShortcutUtils.java:36
(Diff revision 2)
>  import java.lang.reflect.Constructor;
>  
>  public class ShortcutUtils {
>      private static final String LOG_TAG = "ShortcutUtils";
>  
>      public static void createHomescreenIcon(final Intent shortcutIntent, final String aTitle,

Expanding all caller of this util method:"createHomescreenIcon"

* ShortcutUtils.createHomescreenIcon(Intent, String, String, Bitmap)
  * GeckoApplication.createShortcutWithIcon(String, String, Bitmap)

Are you sure you want to treat all shortcut creation(normal/PWA) as "pwa_confirm_added"?
Comment on attachment 8919981 [details]
Bug 1409268 - Add telemetry for pwa badge and oboarding usage.

https://reviewboard.mozilla.org/r/190928/#review197110

::: mobile/android/base/java/org/mozilla/gecko/toolbar/PwaOnboarding.java:29
(Diff revision 3)
>  
>      static final String LINK_PWA_SUMO = "https://developer.mozilla.org/en-US/Apps/Progressive";
>  
>      public static void show(Context context) {
> +
> +        Telemetry.sendUIEvent(TelemetryContract.Event.ACTION, TelemetryContract.Method.DIALOG, "pwa_oboarding_show");

How about the plain text extra here?
Attachment #8919981 - Flags: review?(max) → review-
Comment on attachment 8919981 [details]
Bug 1409268 - Add telemetry for pwa badge and oboarding usage.

https://reviewboard.mozilla.org/r/190928/#review197112

::: mobile/android/base/java/org/mozilla/gecko/toolbar/PwaConfirm.java:31
(Diff revisions 2 - 3)
>  import org.mozilla.gecko.TelemetryContract;
>  import org.mozilla.gecko.webapps.WebAppManifest;
>  
>  public class PwaConfirm extends RelativeLayout {
>  
> -    boolean isAnimating = false;
> +    private static String TELEMETRY_EXTRA = "pwa_confirm";

If you want to concat extra(which I would suggest not to), please make it postfix with "_BASE".

::: mobile/android/base/java/org/mozilla/gecko/toolbar/PwaConfirm.java:32
(Diff revisions 2 - 3)
>  import org.mozilla.gecko.webapps.WebAppManifest;
>  
>  public class PwaConfirm extends RelativeLayout {
>  
> -    boolean isAnimating = false;
> +    private static String TELEMETRY_EXTRA = "pwa_confirm";
> +    private static String TELEMETRY_EXTRA_SHOW = TELEMETRY_EXTRA + "_confirm";

How come **pwa_confirm_show** become **pwa_confirm_confirm**?
Attachment #8919981 - Flags: review?(max) → review-
Comment on attachment 8919981 [details]
Bug 1409268 - Add telemetry for pwa badge and oboarding usage.

https://reviewboard.mozilla.org/r/190928/#review197118
Attachment #8919981 - Flags: review?(max) → review+
Pushed by nechen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a2427f526608
Add telemetry for pwa badge and oboarding usage. r=maliu
https://hg.mozilla.org/mozilla-central/rev/a2427f526608
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 58
Whiteboard: [pwa-front-end] → [FNC][SPT58.3][INT][pwa-front-end]
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: