Filter Google Analytics downloads tracking

Since SEOPress 2.6

function sp_gtag_download_tracking_ev($html) {
return "jQuery(document).ready(function() {
 jQuery('a').filter(function() {
 return this.href.match(/.*\.(pdf|docx|xlsx)(\?.*)?$/);
 }).click(function(e) {
 gtag('event', 'click', {'event_category': 'downloads','event_label' : this.href});
 });
});
";
}
add_filter('seopress_gtag_download_tracking_ev', 'sp_gtag_download_tracking_ev');