diff --git a/Generic_Plugin_Admin.php b/Generic_Plugin_Admin.php index 00413dedf..f6d51be80 100644 --- a/Generic_Plugin_Admin.php +++ b/Generic_Plugin_Admin.php @@ -493,10 +493,10 @@ function w3tc_ga(){dataLayer.push(arguments);} // Track clicks on W3TC Pro Services tab. document.addEventListener('click', function(event) { - if ( jQuery( event.target ).hasClass( 'w3tc-pro-services') ) { + if ( jQuery( event.target ).attr( 'data-tab-type') ) { w3tc_ga('event', 'click', { - 'eventCategory': 'w3tc-pro-services', - 'eventLabel': event.target.innerText + 'eventCategory': 'w3tc-tabs', + 'eventLabel': event.target.getAttribute('data-tab-type'), }); } });