From 5aa1b231d1a571feaea190330d636c632b6ca314 Mon Sep 17 00:00:00 2001 From: Julia Hansbrough Date: Thu, 5 Dec 2013 15:00:42 +0000 Subject: [PATCH] Added segment.io tracking --- lms/templates/dashboard.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lms/templates/dashboard.html b/lms/templates/dashboard.html index 343dfad062..de132187f7 100644 --- a/lms/templates/dashboard.html +++ b/lms/templates/dashboard.html @@ -2,6 +2,7 @@ <%! from django.core.urlresolvers import reverse + import waffle %> <%inherit file="main.html" /> @@ -26,6 +27,17 @@ user = $(event.target).data("user"); course = $(event.target).data("course-id"); Logger.log('edx.course.enrollment.upgrade.clicked', [user, course], null); + % if waffle.flag_is_active(request, 'alternate_upsell_copy'): + analytics.track("Clicked on Alternate Upsell Copy", { + course: course, + user: user + }); + % else: + analytics.track("Clicked on Regular Upsell Copy", { + course: course, + user: user + }); + % endif }); $(".email-settings").click(function(event) {