Skip to content
Snippets Groups Projects
Commit 60c03315 authored by khawkins98's avatar khawkins98
Browse files

Track button clicks

parent 365bc2f5
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......@@ -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');
});
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment