Add analytics tracking to Discover New header link. (#20896)
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -54,7 +54,7 @@ from openedx.core.djangoapps.site_configuration import helpers as configuration_
|
||||
% endif
|
||||
% if show_explore_courses:
|
||||
<div class="mobile-nav-item hidden-mobile nav-item nav-tab">
|
||||
<a class="tab-nav-link" href="${marketing_link('COURSES')}"
|
||||
<a class="tab-nav-link discover-new-link" href="${marketing_link('COURSES')}"
|
||||
aria-current="${'page' if '/courses' in request.path else 'false'}">
|
||||
${_('Discover New')}
|
||||
</a>
|
||||
|
||||
@@ -55,7 +55,7 @@ from openedx.core.djangoapps.site_configuration import helpers as configuration_
|
||||
% endif
|
||||
% if show_explore_courses:
|
||||
<div class="mobile-nav-item hidden-mobile nav-item nav-tab">
|
||||
<a class="tab-nav-link" href="${marketing_link('COURSES')}"
|
||||
<a class="tab-nav-link discover-new-link" href="${marketing_link('COURSES')}"
|
||||
aria-current="${'page' if '/courses' in request.path else 'false'}">
|
||||
${_('Discover New')}
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user