[REV-1205] add event tracking for PLS upsell links (#24522)

Co-authored-by: Diane Kaplan <dkaplan@edx.org>
This commit is contained in:
Diane Kaplan
2020-07-21 10:00:39 -04:00
committed by GitHub
parent c9f5ec3397
commit 72dd144476
3 changed files with 25 additions and 2 deletions

View File

@@ -189,3 +189,15 @@ from openedx.features.course_experience.course_tools import HttpMethod
<%static:webpack entry="Enrollment">
new CourseEnrollment('.enroll-btn', '${course_key | n, js_escaped_string}');
</%static:webpack>
<%static:require_module_async module_name="js/commerce/track_ecommerce_events" class_name="TrackECommerceEvents">
var personalizedLearnerSchedulesLink = $(".personalized_learner_schedules_button");
TrackECommerceEvents.trackUpsellClick(personalizedLearnerSchedulesLink, 'course_home_upgrade_shift_dates', {
pageName: "course_home",
linkType: "button",
linkCategory: "personalized_learner_schedules"
});
</%static:require_module_async>