outline page event tracking
This commit is contained in:
@@ -331,6 +331,12 @@ function createNewUnit(e) {
|
||||
var parent = $(this).data('parent');
|
||||
var template = $(this).data('template');
|
||||
|
||||
analytics.track('Created a Unit', {
|
||||
'course': course_location_analytics,
|
||||
'parent_location': parent
|
||||
});
|
||||
|
||||
|
||||
$.post('/clone_item',
|
||||
{'parent_location': parent,
|
||||
'template': template,
|
||||
@@ -363,6 +369,12 @@ function _deleteItem($el) {
|
||||
|
||||
var id = $el.data('id');
|
||||
|
||||
analytics.track('Deleted an Item', {
|
||||
'course': course_location_analytics,
|
||||
'id': id
|
||||
});
|
||||
|
||||
|
||||
$.post('/delete_item',
|
||||
{'id': id, 'delete_children': true, 'delete_all_versions': true},
|
||||
function (data) {
|
||||
@@ -426,6 +438,11 @@ function displayFinishedUpload(xhr) {
|
||||
var html = Mustache.to_html(template, resp);
|
||||
$('table > tbody').prepend(html);
|
||||
|
||||
analytics.track('Uploaded a File', {
|
||||
'course': course_location_analytics,
|
||||
'asset_url': resp.url
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function markAsLoaded() {
|
||||
@@ -555,6 +572,11 @@ function saveNewSection(e) {
|
||||
var template = $saveButton.data('template');
|
||||
var display_name = $(this).find('.new-section-name').val();
|
||||
|
||||
analytics.track('Created a Section', {
|
||||
'course': course_location_analytics,
|
||||
'display_name': display_name
|
||||
});
|
||||
|
||||
$.post('/clone_item', {
|
||||
'parent_location': parent,
|
||||
'template': template,
|
||||
@@ -600,6 +622,12 @@ function saveNewCourse(e) {
|
||||
return;
|
||||
}
|
||||
|
||||
analytics.track('Created a Course', {
|
||||
'org': org,
|
||||
'number': number,
|
||||
'display_name': display_name
|
||||
});
|
||||
|
||||
$.post('/create_new_course', {
|
||||
'template': template,
|
||||
'org': org,
|
||||
@@ -646,9 +674,14 @@ function saveNewSubsection(e) {
|
||||
|
||||
var parent = $(this).find('.new-subsection-name-save').data('parent');
|
||||
var template = $(this).find('.new-subsection-name-save').data('template');
|
||||
|
||||
var display_name = $(this).find('.new-subsection-name-input').val();
|
||||
|
||||
analytics.track('Created a Subsection', {
|
||||
'course': course_location_analytics,
|
||||
'display_name': display_name
|
||||
});
|
||||
|
||||
|
||||
$.post('/clone_item', {
|
||||
'parent_location': parent,
|
||||
'template': template,
|
||||
@@ -702,6 +735,13 @@ function saveEditSectionName(e) {
|
||||
return;
|
||||
}
|
||||
|
||||
analytics.track('Edited Section Name', {
|
||||
'course': course_location_analytics,
|
||||
'display_name': display_name,
|
||||
'id': id
|
||||
});
|
||||
|
||||
|
||||
var $_this = $(this);
|
||||
// call into server to commit the new order
|
||||
$.ajax({
|
||||
@@ -741,6 +781,12 @@ function saveSetSectionScheduleDate(e) {
|
||||
|
||||
var id = $modal.attr('data-id');
|
||||
|
||||
analytics.track('Edited Section Release Date', {
|
||||
'course': course_location_analytics,
|
||||
'id': id,
|
||||
'start': start
|
||||
});
|
||||
|
||||
// call into server to commit the new order
|
||||
$.ajax({
|
||||
url: "/save_item",
|
||||
|
||||
Reference in New Issue
Block a user