Closed Bug 740269 Opened 12 years ago Closed 10 years ago

Download should be recorded after confirmation instead of on-click

Categories

(Marketplace Graveyard :: Consumer Pages, defect, P4)

defect

Tracking

(Not tracked)

RESOLVED FIXED
2013-08-01

People

(Reporter: krupa.mozbugs, Assigned: basta)

References

Details

(Whiteboard: p=2)

firefox 12

steps to reproduce:
1. Open Firebug->Net
2. Load https://marketplace-dev.allizom.org/en-US/search/
3. Click on 'Install' buttons for one of the apps


observed behavior:
We do a POST to record the download on clicking on the install button. This is inaccurate sonce the user can still cancel the install. This is more obvious in Firefox 12, but is still true for 13 and later versions
For Firefox 13+ only we could use this https://developer.mozilla.org/en/Apps/Apps_JavaScript_API/navigator.mozApps.amInstalled

If you're using anything else, we may not be able to do any better than the `onsuccess` callback (https://developer.mozilla.org/en/Apps/Apps_JavaScript_API/navigator.mozApps.install) which actually runs on success of the installation prompt not the user's acceptance of installation.
Priority: -- → P4
Blocks: 752013
No longer blocks: 735054
Blocks: 766199
No longer blocks: 752013
In our current world, don't the install functions have success callbacks we could use?
(In reply to Wil Clouser [:clouserw] from comment #2)
> In our current world, don't the install functions have success callbacks we
> could use?

Yes.

The current flow:

1) Generate receipt + log install
2) Send receipt to navigator.mozApps.install
3) Accept install

What we could/should do:

1) Generate receipt
2) Send receipt to navigator.mozApps.install
4) Accept install
3) Log install
(In reply to Wil Clouser [:clouserw] from comment #2)
> In our current world, don't the install functions have success callbacks we
> could use?

Yes.

The current flow:

1) Generate receipt + log install
2) Send receipt to navigator.mozApps.install
3) Accept install

What we could/should do:

1) Generate receipt
2) Send receipt to navigator.mozApps.install
3) Accept install
4) Log install
Component: Public Pages → Consumer Pages
Product: addons.mozilla.org → Marketplace
Version: unspecified → 1.0
Blocks: 782711
No longer blocks: 766199
No longer blocks: 782711
Whiteboard: p=2
Is this still something we want? It's really easy to do with the new button deferreds.
aye
https://github.com/mozilla/fireplace/commit/4cb70dbf1db967435d906e0a2f6dbf9c2dd82883

http://i.imgur.com/OQxjtWv.png
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Assignee: nobody → mattbasta
Target Milestone: --- → 2013-08-01
You need to log in before you can comment on or make changes to this bug.