Skip to content

Commit

Permalink
Add settings tabs to GA (#1006)
Browse files Browse the repository at this point in the history
  • Loading branch information
avonville authored Dec 4, 2024
1 parent 931cccb commit e8d5ee4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Generic_Plugin_Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
});
}
});
Expand Down

0 comments on commit e8d5ee4

Please sign in to comment.