Hi @pbvlad,
thank you for your kind words (I would be glad if you could repeat them here).
To track slider usage with Google Analytics, use slick’s afterChange event (see http://kenwheeler.github.io/slick/#settings, scroll down to “Events”).
Follow this thread (not everything): https://ww.wp.xz.cn/support/topic/image-images-instead-of-dots-arrows-bottom-right/#post-8966869. This will help to enqueue an new JavaScript file.
Paste this in slick-slider-custom.js (untested):
jQuery( document ).ready( function() {
var $slick_slider = jQuery( '.slick-slider-wrapper .slick-slider' ),
$slick_slider.on( 'afterChange', function( event, slick, currentSlide, nextSlide ) {
ga( 'send', 'event', 'Slider', 'swiped', 'Name of slider' );
} );
$slick_slider.slick();
} );
You might also submit the variables event, slick, currentSlide, nextSlide to the ga() function. Please see the Google Analytics Guides on this topic for a detailed explanation.
I hope this is what you are looking fore.
Hi @pbvlad,
have you been able to review my response? I’d really like to see this thread resolved.
Thread Starter
Vladi
(@pbvlad)
@tyrannous Yes, thanks mate. This is perfect, just what I was looking for!
Hi @pbvlad,
I’m glad it’s working.