From 72dd144476cd4fa16d2513f7b40b2bfc26c3365d Mon Sep 17 00:00:00 2001 From: Diane Kaplan Date: Tue, 21 Jul 2020 10:00:39 -0400 Subject: [PATCH] [REV-1205] add event tracking for PLS upsell links (#24522) Co-authored-by: Diane Kaplan --- lms/templates/courseware/dates.html | 11 +++++++++++ lms/templates/dates_banner.html | 4 ++-- .../course_experience/course-home-fragment.html | 12 ++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/lms/templates/courseware/dates.html b/lms/templates/courseware/dates.html index f140089522..37fd5d78ea 100644 --- a/lms/templates/courseware/dates.html +++ b/lms/templates/courseware/dates.html @@ -95,3 +95,14 @@ from openedx.core.djangolib.markup import HTML, Text <%static:require_module_async module_name="js/dateutil_factory" class_name="DateUtilFactory"> DateUtilFactory.transform(iterationKey=".localized_datetime"); + +<%static:require_module_async module_name="js/commerce/track_ecommerce_events" class_name="TrackECommerceEvents"> + var personalizedLearnerSchedulesLink = $(".personalized_learner_schedules_button"); + + TrackECommerceEvents.trackUpsellClick(personalizedLearnerSchedulesLink, 'dates_upgrade', { + pageName: "dates_tab", + linkType: "button", + linkCategory: "personalized_learner_schedules" + }); + + diff --git a/lms/templates/dates_banner.html b/lms/templates/dates_banner.html index 8b0505a878..25f4a14735 100644 --- a/lms/templates/dates_banner.html +++ b/lms/templates/dates_banner.html @@ -52,7 +52,7 @@ additional_styling_class = 'on-mobile' if is_mobile_app else 'has-button' % if not is_mobile_app: % if not is_mobile_app: