Skip to content

Commit 2cfb4aa

Browse files
authored
Merge pull request #252 from OpenStackweb/global-nav-tracking
Added test of global nav analytics tracking
2 parents 8235b99 + f14696d commit 2cfb4aa

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

themes/openstack/javascript/navigation.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,17 @@ jQuery(window).on("resize",function () {
8181
if (jQuery(window).width() > 767) {
8282
$("li").removeClass("open");
8383
}
84+
});
85+
86+
// Global Nav UI Tracking
87+
88+
jQuery(document).ready(function($) {
89+
$(document).on("click", ".project___1BAp9", function(){
90+
var href = $(this).attr('href');
91+
ga('send', 'event', {
92+
eventCategory: 'Global UI Navigation',
93+
eventAction: 'Click',
94+
eventLabel: href
95+
});
96+
});
8497
});

0 commit comments

Comments
 (0)