Last active
June 2, 2017 15:37
-
-
Save brianbancroft/a09c29607bebbc1debbaa281763af464 to your computer and use it in GitHub Desktop.
Learning Center Metrics
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WISTIA API FOR LOADING VIDEOS | |
/* | |
https://api.wistia.com/v1/stats/medias/avk9twrrbn.json | |
for now, video views will be avoided. | |
*/ | |
const aggregateInformation = { | |
summary: { | |
total_lesson_visits: 32423, | |
// total_video_views: nil, // TO be implemented in a future spec | |
total_course_visits: 32423, | |
average_lesson_visits_per_user: 0, // DIVIDE TOTAL LESSON VISITS BY USER LENGTH WHERE USER LESSONUSER LENGTH > 1 | |
average_unique_lesson_vies_per_user: 0, // DIVIDE TOTAL UNIQUE LESSON VISITS BY USER LENGTH | |
// average_lesson_video_views: nil, | |
average_course_completion: 0, // NUMBER between 0-100; two decimal places | |
total_course_resource_visits: 0, | |
total_lesson_resource_visits: 0, | |
average_course_resource_visits_per_user: 0, | |
average_lesson_resource_visits_per_user: 0, | |
// Array, ordered by total number of lesson hits, descending | |
all_lessons: [ | |
], | |
// Array, ordered by total number of course_resource hits, descending | |
all_course_resource: [ | |
], | |
// Array, ordered by the total number of lesson_resource hits, descending | |
all_lesson_resoures: [ | |
], | |
}, | |
// Array, ordered by total number of lesson hits, descending | |
courses: [ | |
{ | |
summary: { | |
id: '', // Copy over of id | |
title: '', // Copy over of title | |
description: '', // Copy over of description | |
// Array, ordered by total number of course_resource hits, descending | |
course_resources: [ | |
], | |
percentage_users_who_complete_courses: 0, // number between [0,100] | |
total_lesson_views: 21231131, | |
// total_lesson_video_views: nil, | |
total_lesson_resource_views: 0, | |
total_unique_lesson_views: 0, | |
average_views_per_lesson: 0, | |
// average_video_views_per_lesson: nil, // Obtained using the Wistia API | |
average_unique_views_per_lesson: 0, | |
}, | |
lessons: [ | |
{ | |
id: 0, | |
lesson_presenter_id: 0, | |
title: '', | |
visits: 0, | |
// video_views: 0, // Grab all video views through the Wistia API | |
unique_visits: 0, | |
percentage_users_who_do_lesson: 0, // number between [0,1] | |
// Array, ordered by total number of hits, descending | |
lesson_resources: [ | |
] | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment