Tagged: enfold, event, google analytics, tabs
Hello!
I would like to add an event tracker on each of the different tab of my product page (see below) in order to see what is the most relevant and if people do click on each of them or just in one or two.
Would you know how to do this?
Thank you so much for your help,
Vincent
Hey,
Refer to:
https://kriesi.at/support/topic/please-clear-this-up-for-em-ga-tracking-2/#post-348525
The tracking part would be something like this:
$('.tab_titles .tab_counter_0').on('click', function() {
ga('send', 'event', 'button', 'click', 'button-1');
});
$('.tab_titles .tab_counter_1').on('click', function() {
ga('send', 'event', 'button', 'click', 'button-1');
});
$('.tab_titles .tab_counter_2').on('click', function() {
ga('send', 'event', 'button', 'click', 'button-1');
});
$('.tab_titles .tab_counter_3').on('click', function() {
ga('send', 'event', 'button', 'click', 'button-1');
});
$('.tab_titles .tab_counter_4').on('click', function() {
ga('send', 'event', 'button', 'click', 'button-1');
});
Best regards,
Josue
Thank you so much Josue! I wish I knew this before!
Could you tell me what this line
$('.tab_titles .tab_counter_0')
would be for an accordeon?
Many thanks again!
Vincent
Hi,
Try this:
$('[data-fake-id="#toggle-id-25"]')
25 would be the numeric value of the toggle.
Best regards,
Josue