Tracking metrics on Hour of Code Thimble Tutorials

RESOLVED FIXED

Status

RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: lainie, Assigned: cade)

Tracking

Details

Attachments

(4 attachments)

Updated

5 years ago
Assignee: nobody → cade
Status: NEW → ASSIGNED
(Assignee)

Comment 1

5 years ago
I've got a working API method for this on a local branch. Though, what I've implemented just leverages things we already have.

Every Make knows which make it was remixed from, so I search for makes whose remixedFrom field === the id of the make in question. Then you can count the total results, or, you iterate over each remix result and compare it's createdAt date to a specific Date range, giving you the total number of remixes in a specific time period. This method could be expanded to include some kind of depth level, I.E. remixes of remixes of remixes ....
(Assignee)

Comment 3

5 years ago
Created attachment 8350324 [details] [review]
https://github.com/mozilla/makeapi-client/pull/23

This and the above patch implement the remixCount route on the MakeAPI. It takes a Make ID, and a from and to date, and calculates how many makes were made for the given project in the given time range.

I added UI on the Make editor for this. Using the grid, you click on the ID of the make you want to query for, and it's applied to the remix count input below the grid. you select a start and end date using the date input boxes and then press "Get Remix Count". The total count is displayed.
(Assignee)

Comment 4

5 years ago
Could you link the publish URL's of those Makes in comment 0? I'll try and get the data manually tomorrow morning, so we don't have to wait for this to land.
Flags: needinfo?(lainie)
(Assignee)

Comment 6

5 years ago
I'm not sure if my script is working properly, but here's what I get: https://gist.github.com/cadecairos/1c0f5ad13b3b853e10f5

Are you sure those makes were being remixed?
Flags: needinfo?(lainie)
(Assignee)

Comment 7

5 years ago
aha! It was my code. I was only fetching at most ten remixes per url. Each make has thousands XD 

I will work on fixing up the script.
Flags: needinfo?(lainie)
(Assignee)

Comment 8

5 years ago
https://gist.github.com/cadecairos/4b323796a8906d6bb765

Teh results from my updated script look much better!
(Assignee)

Comment 9

5 years ago
Created attachment 8355231 [details]
A helper script for getting remix metrics for makes

For future reference, this is the script I used to generate the remix metrics.
(Assignee)

Updated

5 years ago
Attachment #8350319 - Flags: review?(scott)
(Assignee)

Updated

5 years ago
Attachment #8350324 - Flags: review?(scott)
(Reporter)

Comment 11

5 years ago
Super helpful. Thank you!
Attachment #8350319 - Flags: review?(scott) → review+
Attachment #8350324 - Flags: review?(scott) → review+

Comment 13

5 years ago
Commit pushed to master at https://github.com/mozilla/MakeAPI

https://github.com/mozilla/MakeAPI/commit/6dd68f61b3c09d85c992af949b8fe81871af558c
Bug 951761 - Add route remixCount route, Admin page support for remixCount
(Assignee)

Comment 15

5 years ago
This is on prod now, but I realized that the route can't count makes with > 10 remix results properly... a patch is on the way.
(Assignee)

Comment 16

5 years ago
Created attachment 8355333 [details] [review]
https://github.com/mozilla/MakeAPI/pull/186

I've completely changed the way this works to make life easier. 

The previous approach I took got a list of remakes, and looped over them to check if the remix happened in a specific date range. 

This time, I extended the querybuilder so that it uses a remixedFrom filter and the all-new range filter to check the createdAt value. This method eliminates the need for any make data to be looped over as I can just return the total count of hits elasticsearch reports
Attachment #8355333 - Flags: review?(scott)
(Reporter)

Comment 17

5 years ago
Does this mean the numbers in comment #8 are no longer valid?
@lainie I believe the numbers are still good. It looks like he just changed it to do the same thing faster and with less code to maintain.
Comment on attachment 8355333 [details] [review]
https://github.com/mozilla/MakeAPI/pull/186

I like where you're going with this.

Some questions in the pull request.
Attachment #8355333 - Flags: review?(scott) → review-
(Assignee)

Comment 20

5 years ago
(In reply to lainie from comment #17)
> Does this mean the numbers in comment #8 are no longer valid?

(In reply to Scott [:thecount] Downe from comment #18)
> @lainie I believe the numbers are still good. It looks like he just changed
> it to do the same thing faster and with less code to maintain.

Yes, The numbers are still valid, I just improved the way I get them.
(Assignee)

Updated

5 years ago
Attachment #8355333 - Flags: review- → review?(scott)
Attachment #8355333 - Flags: review?(scott) → review+
(Assignee)

Comment 22

5 years ago
All fixed! now you can find remix metrics for every make using a date range using the Make Editor.
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.