Closed Dooza closed 8 years ago
Figured it out:
activate: function(event, tab) {
ga('send','event','Tab','Clicked',tab.selector);
}
The only issue is that it fires as soon as the page loads as well as when a tab is clicked. I would prefer it to fire on just tab clicks. Any ideas?
Dooza
To solve it in a simple way you could do:
$(document).ready(function () {
var activated = false;
$('#tab').responsiveTabs({
activate: function(e, tab) {
if (activated) {
// Do your stuff
}
activated = true;
}
});
});
Hi there, I want to fire off a Google Analytics event when someone clicks a tab. Has anyone done this before? I think I need to use "activate", but not sure how to get the name of the tab. Any ideas?
Cheers,
Dooza