Files
edx-platform/lms/static/js/dashboard/credit.js
Will Daly e2acf3ab87 Credit eligibility/provider refactor
* Remove m2m relation between credit course and credit providers.
* Separate eligibility and provider APIs into different modules.
* Add API call for retrieving a user's eligibilities.
* Cache credit course list.
* Style the dashboard purchase button.
* Display a link for the credit provider on the dashboard.
* Add analytics events for clicks on the purchase button.
* Expose more credit models to Django admin and add search functionality.
2015-07-02 10:03:52 -07:00

18 lines
550 B
JavaScript

(function($, analytics) {
'use strict';
$(document).ready(function() {
// Fire analytics events when the "purchase credit" button is clicked
$(".purchase-credit-btn").on("click", function(event) {
var courseKey = $(event.target).data("course-key");
analytics.track(
"edx.bi.credit.clicked_purchase_credit",
{
category: "credit",
label: courseKey
}
);
});
});
})(jQuery, window.analytics);