Track share count totals in database

RESOLVED FIXED in 5.0.9

Status

P2
normal
RESOLVED FIXED
10 years ago
3 years ago

People

(Reporter: clouserw, Assigned: clouserw)

Tracking

unspecified
5.0.9

Details

Attachments

(1 attachment)

(Assignee)

Description

10 years ago
Once bug 482389 lands we'll have a table called share_counts filled with download numbers.  We need to edit /bin/maintenance.php to track these numbers.  I'm tired, but something like:

1) create stats_share_counts_totals table
2) select service, sum('count') for each add-on id, insert them into the new table
3) (bonus) look at the current global constant $link_sharing_services.  If any service in the database isn't in that array, delete it.  You can put this in the garbage collection part of maintenance.php I guess.
Priority: -- → P2
Target Milestone: 5.0.4 → 5.0.5
Target Milestone: 5.0.5 → 5.0.7
Target Milestone: 5.0.7 → 5.0.8
(Assignee)

Updated

10 years ago
Assignee: nobody → clouserw
Just FYI for future enhancements to this, here is a list of the data that is being recorded in the metrics data warehouse.  We could expand our export to AMO to include any of these fields:

date of request
hour of request
geographic region of request
locale of the request (e.g. what localized version of the add-on page were they viewing when they clicked "share")
product name (e.g. were they viewing the Firefox or Thunderbird page for the add-on
filtered user agent string of the request (currently must be one of Webkit/Gecko/MSIE/Opera to count)
Target Milestone: 5.0.8 → 5.0.9
(Assignee)

Comment 2

10 years ago
Created attachment 394545 [details] [diff] [review]
track totals
Attachment #394545 - Flags: review?(fwenzel)
Comment on attachment 394545 [details] [diff] [review]
track totals

Looks good, in general.

I am not going to r- on this, but instead of adding a handful of comments stating the array should be global, why don't you just drop it into constants.php?

Unless, of course, we are planning on having  share_count_totals model soon.
Attachment #394545 - Flags: review?(fwenzel) → review+
(Assignee)

Comment 4

10 years ago
(In reply to comment #3)
> (From update of attachment 394545 [details] [diff] [review])
> Looks good, in general.
> 
> I am not going to r- on this, but instead of adding a handful of comments
> stating the array should be global, why don't you just drop it into
> constants.php?
> 
> Unless, of course, we are planning on having  share_count_totals model soon.

If it were that easy I would have. ;)  The array uses ___() which is defined in core and not available in constants.php yet.  That's why it was moved to the model to begin with.

r49280
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
(In reply to comment #4)
> If it were that easy I would have. ;)

woo, nothingevereasy++
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.