Skip to content

Commit

Permalink
Don't use GA callback for in-page interactions
Browse files Browse the repository at this point in the history
  • Loading branch information
sgarrity committed Jan 23, 2015
1 parent 8672efe commit 7fb4d94
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions media/js/privacy/privacy-day.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@ $(function() {
};

// Setup GA tracking for main tabs
$('#tips-nav-direct a').on('click', function(e) {
$('#tips-nav-direct a').on('click', function() {
var thisTabName = $(this).attr('href');
trackClick([
console.log(thisTabName);
gaTrack([
'_trackEvent',
'/privacy/ Interactions',
thisTabName.substr(1), // strip # char from tab hash
'Tab Click'
], $(this).attr('href'), e);
]);
});

// Setup GA tracking for paragraph and list links
Expand All @@ -69,23 +70,23 @@ $(function() {
});

// Setup GA tracking for next tab buttons
$('.tip-footer .next a').on('click', function(e) {
trackClick([
$('.tip-footer .next a').on('click', function() {
gaTrack([
'_trackEvent',
'/privacy/ Interactions',
pager.currentPage.id,
'Next'
], $(this).attr('href'), e);
]);
});

// Setup GA tracking for previous tab buttons
$('.tip-footer .previous a').on('click', function(e) {
trackClick([
$('.tip-footer .previous a').on('click', function() {
gaTrack([
'_trackEvent',
'/privacy/ Interactions',
pager.currentPage.id,
'Previous'
], $(this).attr('href'), e);
]);
});

});

0 comments on commit 7fb4d94

Please sign in to comment.