[REV-1205] add event tracking for PLS upsell links (#24522)
Co-authored-by: Diane Kaplan <dkaplan@edx.org>
This commit is contained in:
@@ -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>
|
||||
|
||||
<%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"
|
||||
});
|
||||
|
||||
</%static:require_module_async>
|
||||
|
||||
@@ -52,7 +52,7 @@ additional_styling_class = 'on-mobile' if is_mobile_app else 'has-button'
|
||||
</div>
|
||||
% if not is_mobile_app:
|
||||
<div class="upgrade-button">
|
||||
<a href="${verified_upgrade_link}">
|
||||
<a class="personalized_learner_schedules_button" href="${verified_upgrade_link}">
|
||||
<button type="button">
|
||||
${_('Upgrade to shift due dates')}
|
||||
</button>
|
||||
@@ -76,7 +76,7 @@ additional_styling_class = 'on-mobile' if is_mobile_app else 'has-button'
|
||||
</div>
|
||||
% if not is_mobile_app:
|
||||
<div class="upgrade-button">
|
||||
<a href="${verified_upgrade_link}">
|
||||
<a class="personalized_learner_schedules_button" href="${verified_upgrade_link}">
|
||||
<button type="button">
|
||||
${_('Upgrade now')}
|
||||
</button>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user