event tracking
by mtenschert
JavaScript
$(document).ready(function() {
var priceList = function(eventAction) {
ga('send', {
hitType: 'event',
eventCategory: 'A/B tests', // Error research
eventAction: eventAction, // click_not_possible_payment, hover_not_possible_payment
eventLabel: 'Pricelist' // Checkout Search Form
});
};
$('.toggle-prices-btn').click(function() {
priceList('open');
});
$('.product-price-container select').change(function() {
priceList('selectBox');
});
$('.product-price-container .addon-container input').change(function() {
priceList('ShoesCheckbox');
});
$(document).on('mousedown','.product-price-container a.next', function() {
priceList('next');
});
$(document).on('mousedown','.product-price-container a.prev', function() {
priceList('prev');
});
});