Skip to content

Commit

Permalink
Track button clicks
Browse files Browse the repository at this point in the history
  • Loading branch information
khawkins98 committed Aug 21, 2017
1 parent 365bc2f commit 60c0331
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions js/foundationExtendEBI.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,19 @@ function ebiGaInit() {
jQuery("body.google-analytics-loaded .track-with-analytics-events a").on('mousedown', function(e) {
analyticsTrackInteraction(e.target,'Manually tracked area');
});
jQuery("body.google-analytics-loaded .masthead-black-bar").on('mousedown', 'a', function(e) {
jQuery("body.google-analytics-loaded .masthead-black-bar").on('mousedown', 'a, button', function(e) {
analyticsTrackInteraction(e.target,'Black bar');
});
jQuery("body.google-analytics-loaded .masthead").on('mousedown', 'a', function(e) {
jQuery("body.google-analytics-loaded .masthead").on('mousedown', 'a, button', function(e) {
analyticsTrackInteraction(e.target,'Masthead');
});
jQuery("body.google-analytics-loaded .related ul").on('mousedown', 'li > a', function(e) {
analyticsTrackInteraction(e.target,'Popular');
});
jQuery("body.google-analytics-loaded .with-overlay").on('mousedown', 'a', function(e) {
jQuery("body.google-analytics-loaded .with-overlay").on('mousedown', 'a, button', function(e) {
analyticsTrackInteraction(e.target,'Highlight box');
});
jQuery("body.google-analytics-loaded #global-footer").on('mousedown', 'a', function(e) {
jQuery("body.google-analytics-loaded #global-footer").on('mousedown', 'a, button', function(e) {
analyticsTrackInteraction(e.target,'Footer');
});
jQuery("body.google-analytics-loaded #global-search").on('mousedown', 'input', function(e) {
Expand All @@ -104,24 +104,24 @@ function ebiGaInit() {
jQuery("body.google-analytics-loaded #local-search").on('mousedown', 'input', function(e) {
analyticsTrackInteraction(e.target,'Local search');
});
jQuery("body.google-analytics-loaded .analytics-content-intro, body.google-analytics-loaded .intro-unit").on('mousedown', 'a', function(e) {
jQuery("body.google-analytics-loaded .analytics-content-intro, body.google-analytics-loaded .intro-unit").on('mousedown', 'a, button', function(e) {
analyticsTrackInteraction(e.target,'Intro');
});
jQuery("body.google-analytics-loaded .analytics-content-sidebar").on('mousedown', 'a', function(e) {
jQuery("body.google-analytics-loaded .analytics-content-sidebar").on('mousedown', 'a, button', function(e) {
analyticsTrackInteraction(e.target,'Sidebar');
});
jQuery("body.google-analytics-loaded .analytics-content-left").on('mousedown', 'a', function(e) {
jQuery("body.google-analytics-loaded .analytics-content-left").on('mousedown', 'a, button', function(e) {
analyticsTrackInteraction(e.target,'Left content');
});
jQuery("body.google-analytics-loaded .analytics-content-right").on('mousedown', 'a', function(e) {
jQuery("body.google-analytics-loaded .analytics-content-right").on('mousedown', 'a, button', function(e) {
analyticsTrackInteraction(e.target,'Right content');
});
jQuery("body.google-analytics-loaded .analytics-content-footer").on('mousedown', 'a', function(e) {
jQuery("body.google-analytics-loaded .analytics-content-footer").on('mousedown', 'a, button', function(e) {
analyticsTrackInteraction(e.target,'Content footer');
});

// catch all -- should come last
jQuery("body.google-analytics-loaded #main-content-area, body.google-analytics-loaded .analytics-content-main").on('mousedown', 'a', function(e) {
jQuery("body.google-analytics-loaded #main-content-area, body.google-analytics-loaded .analytics-content-main").on('mousedown', 'a, button', function(e) {
analyticsTrackInteraction(e.target,'Main content');
});

Expand Down

0 comments on commit 60c0331

Please sign in to comment.