Closed Bug 1265351 Opened 6 years ago Closed 6 years ago

Add to home screen promotion: Save rejection and send telemetry only once

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(firefox48 fixed)

RESOLVED FIXED
Firefox 48
Tracking Status
firefox48 --- fixed

People

(Reporter: sebastian, Assigned: sebastian)

References

Details

Attachments

(2 files)

Looking at the telemetry for the "Add to home screen" promotion we see that the request is declined way more often than we show the prompt.

In the code we do not check if the prompt has already been declined (multiple touch events / pressed on back). Therefore we'll send telemetry multiple times and save the rejection in url_annostations multiple times.
Assignee: nobody → s.kaspari
Status: NEW → ASSIGNED
Additionally this patch:
* unifies the telemetry for declining the prompt to always be: (cancel,back,'home_screen_promotion')
* moves saving the rejection in the database to a background thread

Review commit: https://reviewboard.mozilla.org/r/47153/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/47153/
Attachment #8742356 - Flags: review?(margaret.leibovic)
Comment on attachment 8742356 [details]
MozReview Request: Bug 1265351 - HomeScreenPrompt: Save rejection and send telemetry only once. r?margaret

https://reviewboard.mozilla.org/r/47153/#review43785

::: mobile/android/base/java/org/mozilla/gecko/promotion/HomeScreenPrompt.java:214
(Diff revision 1)
>      @Override
>      public void onBackPressed() {
> +        onDecline();
> +    }
> +
> +    private synchronized void onDecline() {

Why does this method need to be synchronized? Can this be called from multiple threads? When would this not be called on the UI thread?
Attachment #8742356 - Flags: review?(margaret.leibovic) → review+
https://reviewboard.mozilla.org/r/47153/#review43785

> Why does this method need to be synchronized? Can this be called from multiple threads? When would this not be called on the UI thread?

I think you are right. I'll remove it.
https://hg.mozilla.org/integration/fx-team/rev/6b2350929cdb675daf16baedf10e06f2dff008fb
Bug 1265351 - HomeScreenPrompt: Save rejection and send telemetry only once. r=margaret
https://hg.mozilla.org/mozilla-central/rev/6b2350929cdb
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 48
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.