Add analytics tracking to Discover New header link. (#20896)

This commit is contained in:
Douglas Hall
2019-06-25 16:36:59 -04:00
committed by GitHub
parent 52a5c81589
commit 0f045ab5db
3 changed files with 7 additions and 3 deletions

View File

@@ -73,7 +73,7 @@ var edx = edx || {};
// Emit an event when the 'Find Courses' button is clicked.
edx.dashboard.trackFindCourseBtnClicked = function($findCoursesBtn, properties) {
var trackProperty = properties || {category: 'dashboard', label: null};
var trackProperty = properties || {category: 'dashboard', label: 'sidebar'};
window.analytics.trackLink(
$findCoursesBtn,
'edx.bi.dashboard.find_courses_button.clicked',
@@ -91,5 +91,9 @@ var edx = edx || {};
edx.dashboard.trackCourseOptionDropdownClicked($('.wrapper-action-more'));
edx.dashboard.trackLearnVerifiedLinkClicked($('.verified-info'));
edx.dashboard.trackFindCourseBtnClicked($('.btn-find-courses'));
edx.dashboard.trackFindCourseBtnClicked(
$('.discover-new-link'),
{category: 'dashboard', label: 'header'}
);
});
}(jQuery));