Fix event tracking for pathway buttons.

Switches to tracking pathway_uuid to match the original event proposal.

LEARNER-6087
This commit is contained in:
Brandon Baker
2018-09-05 09:56:26 -04:00
parent 5b49a8e926
commit 07ef68ef09
3 changed files with 6 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@@ -95,14 +95,14 @@ class ProgramDetailsSidebarView extends Backbone.View {
}
trackPathwayClicked(event) {
var button = event.currentTarget;
const button = event.currentTarget;
window.analytics.track('edx.bi.dashboard.program.pathway.clicked', {
category: 'pathways',
// Credentials uses the uuid without dashes so we are converting here for consistency
program_uuid: this.programModel.attributes.uuid.replace(/-/g, ''),
program_name: this.programModel.attributes.title,
pathway_link_id: $(button).data('pathwayId'),
pathway_link_uuid: $(button).data('pathwayUuid').replace(/-/g, ''),
pathway_name: $(button).data('pathwayName'),
});
}

View File

@@ -37,7 +37,7 @@
<% if (pathway.destination_url) { %>
<div class="sidebar-button-wrapper">
<a href="<%- pathway.destination_url %>" class="pathway-link">
<button class="btn pathway-button sidebar-button" data-pathway-id="<%- pathway.id %>" data-pathway-name="<%- pathway.name %>"><%- gettext('Learn More') %></button>
<button class="btn pathway-button sidebar-button" data-pathway-uuid="<%- pathway.uuid %>" data-pathway-name="<%- pathway.name %>"><%- gettext('Learn More') %></button>
</a>
</div>
<% } %>
@@ -63,7 +63,7 @@
<% if (pathway.destination_url) { %>
<div class="sidebar-button-wrapper">
<a href="<%- pathway.destination_url %>" class="pathway-link">
<button class="btn pathway-button sidebar-button" data-pathway-id="<%- pathway.id %>" data-pathway-name="<%- pathway.name %>"><%- gettext('Learn More') %></button>
<button class="btn pathway-button sidebar-button" data-pathway-uuid="<%- pathway.uuid %>" data-pathway-name="<%- pathway.name %>"><%- gettext('Learn More') %></button>
</a>
</div>
<% } %>