Learn how to easily track Events (Clicks, etc.) in Slider revolution 5 for WordPress with Google Analytics.

If you want to track your clicks in SLider Revolution 5 for WordPress then this tutorial will show you step by step how to achieve this. Great if you’re using a large hero image on a landing page or selling goods directly from Slider Revolution.

Grab the Javascript code here:

Track Individual Clicks

 

jQuery('body').on('click', '.ga-button', function() {

var $this = jQuery(this),
data = $this.attr('data-link') || $this.attr('href');

if(!data) {

data = $this.attr('data-actions');
if(data) data = data[0].url;
if(!data) data = $this.attr('id');

}

// __ga('send', 'event', 'outbound', 'click', data, {'transport': 'beacon'});
__gaTracker('send', 'event', 'outbound', 'click', data, {'transport': 'beacon'});

});

 

Track Click Events for Entire Slide

jQuery(window).on('load', function() {

jQuery('.rev_slider').each(function() {

var ids = jQuery(this).attr('id').split('rev_slider_')[1].split('_')[0],
api = eval('revapi' + ids);

api.on('revolution.slide.onchange', function(e, data) {

var data = 'Slider ' + ids + ' changed to slide #' + data.slideIndex;
// __ga('send', 'event', 'outbound', 'click', data, {'transport': 'beacon'});
__gaTracker('send', 'event', 'outbound', 'click', data, {'transport': 'beacon'});

});

});

});

 

Free tutorials for WordPress, Slider Revolution and Visual Composer. New tutorials added every Wednesday.

Take your WordPress website and skills to the next level!

AFFILIATE DOWNLOADS
If you like what we do and would like to support us, please consider using these affiliate links when purchasing any of the plugins covered in our tutorials. Thank you for your support.

CSSHERO: http://bit.ly/2qbrRl6

ELEMENTOR PRO: http://bit.ly/2u3mzYX

SLIDER REVOLUTION 5 – http://bit.ly/2qDFU4G

VISUAL COMPOSER: http://bit.ly/2rnre70

IMPREZA THEME: http://bit.ly/2rn5yYx

SUBSCRIBE
http://bit.ly/2rX7rhu

LETS CONNECT:
https://twitter.com/WPTutz

SUPPORT: Our website offers additional information and perks. Please check it out! https://wptuts.co.uk

Enjoy this article and want more?

Why not join our weekly newsletter and we’ll let you know when we add more awesome Wordpress tutorials and articles?

Close Menu

We use cookies to ensure that we give you the best experience on our website.