Google Analytics Event Tracking for Slider Revolution

Learn how to set up Google Analytics Event Tracking for Slider Revolution in WordPress to gain insights on user interactions and optimize your site.

Google Analytics Event Tracking for Slider Revolution

Overview of Google Analytics Event Tracking for Slider Revolution

Google Analytics is a powerful tool that provides valuable insights into user behavior on your website. However, you must set up event tracking to get the most out of Google Analytics.

Event tracking allows you to track specific user interactions on your website, such as button clicks, video plays, and more. In this article, we will focus on how to set up Google Analytics Event Tracking for Slider Revolution.

Slider Revolution WordPress plugin allows you to create beautiful, responsive sliders [?] A slider is a type of module that contains multiple slides. You can only see one slide at a time, a distinguishing features that makes sliders different from carousels.

The slides of a slider can be panned through either by using navigation controls such as arrows and tabs, or by clicking and dragging. They can also be set to automatically transition from one slide to the next.
and carousels for your website.

What Events Should You Track in Slider Revolution?

  • Slide [?] A "slide" in Slider Revolution is a container into which multiple layers can be added, with layers in turn acting as containers for various forms of media such as images, text, video, audio, buttons, and special effects.

    Slides are added to modules and edited via the module editor.

    Within the module editor, each slide has its own animation timeline, background and collection of layers.

    A single module can have one or many slides. A module with one slide is called a scene, and a module with multiple slides is called a slider or carousel.
    Clicks
  • Layer [?] Layers are containers for visual, audio or layout items and are added to slides. For example, text, button, image, audio, video, group and row are all types of layers.

    Layers are added to slides via the module editor.
    Clicks
  • Button Clicks
  • Video Plays
  • Form Submissions
  • Digital Downloads

Setup Google Analytics Account

To set up Google Analytics, create an account and obtain the tracking code (if you haven’t made one); follow these guides to: 

You can also use a third-party WordPress plugin to smoothly connect the Google Analytics account to your website.

Adding link actions to slides and layers allows users to click and be redirected to another page or website. And you can connect the hyperlinks with Google Analytics to track them.

Access the Slider Revolution Dashboard

Go to your website:

WordPress Dashboard

Click on the Slider Revolution tab from the left sidebar:

Revolution Slider dashboard

Hover over the module [?] A module in Slider Revolution acts as a container for slides, which in turn act as containers for layers. Modules are created and edited with the module editor.

A "module" is a single, self contained piece of content. You can think of this as being similar to the way a post or page in regular WordPress is a self contained piece of content.

A module can represent any kind of content Slider Revolution is capable of creating, such as a slider, carousel, hero unit, navigation menu, posts display and so on.

Multiple modules can be combined to form rich content such as complete sites and landing pages.
you wish to edit:

Slider Revolution Module

Click on the pencil icon to edit the module:

Edit Slider Revolution Module
Add CSS class to a Slide

This section will teach you to add the ga-button class name to the slide. Ensure that you already have a hyperlink added to your slides.

Go to the Slide Options tab:

Slide Options tab

Click on Tags & Link sub-section:

Tags and link sub-section

Scroll down to the Slide HTML Tags panel:

Slide HTML tags panel

In the Class field, add the ga-button class name:

Input ga-button class in the Class option - Google Analytics

Click the Save button:

Click the Save button
Assign CSS Class to a Button Layer

This section will teach you to add the ga-button class name to a button layer.

If you’re unsure how to add a button layer and set up link actions in Slider Revolution, check out these guides:

Now, we will add the class name to a button layer.

Go to the Layer Options tab:

Layer Options tab

Click on the button layer:

select a button to edit

Go to the Attributes sub-section:

Go to Attributes sub-section

In the Classes field, add the ga-button class name:

Input ga-button in the Classes option field - Google Analytics

Click the Save button:

Click the save button

Add Tracking Code

Access the custom JS code editor in Slider Revolution to add tracking code from Google Analytics.

Note: This code does not need to be modified. Just copy and paste it into the Custom JS Code Editor.

To track outbound links (e.g. button layers):

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');
 
    }
 
    gtag('event', 'click', { event_category: 'outbound', event_action: 'click', event_label: data});
 
}); 

To track slides hyperlinks:

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;
            gtag('event', 'click', { event_category: 'outbound', event_action: 'click', event_label: data});
 
        });
 
    });
 
}); 

Troubleshooting Common Issues With Event Tracking in the Slider Revolution

Google Analytics Event Tracking for Slider Revolution can sometimes encounter issues that prevent it from functioning correctly. Here are some common problems you may encounter and how you can troubleshoot them:

Event Not Firing

If your Event Tracking code is not firing, check to ensure the code is correctly added in the slider’s Custom JS Code Editor.

Inconsistent Event Tracking

If your Event Tracking code is only firing sometimes, ensure the code is applied consistently to all layers in the slider you want to track. Ensure that all layers have the same Event Tracking code and that the code is consistently used throughout your slider.

Incorrect Event Tracking Data

If your Event Tracking data appears inaccurate, ensure that you are tracking the correct events and that your event tracking parameters are correct. Double-check that the event category, action, label, and value are valid and consistently applied throughout your slider.

Cross-Domain Tracking Issues

You may encounter cross-domain tracking issues if you have multiple domains or subdomains tracking events across these domains. Make sure that cross-domain tracking is correctly set up in Google Analytics and that your Event Tracking code is set up to work across domains.

Slow Loading Times

The Event Tracking code may not fire correctly if your website is slow. Ensure that your website is optimized for fast loading times and that your Event Tracking code is perfectly placed in the header of your slider’s Custom JS Code Editor.

By troubleshooting these common issues, you can ensure that your Google Analytics Event Tracking for Slider Revolution is working correctly and providing you with accurate data.

Contact Us

If you encounter issues or have queries about the Global Settings, don’t hesitate to contact our support team by opening a ticket or emailing us at [email protected].

Google Analytics Event Tracking for Slider Revolution

The Author

Kashif Ahmed

Living by the motto "Be the reason someone smiles today."

If you have any questions or concerns, feel free to reach out to me directly at [email protected].

Liked this Post?
Please Share it!

Leave a Reply

Your email address will not be published. Required fields are marked *