<?php
add_filter('facetwp_asset_html', function($html, $url) {
// Check if it's a script tag
if (strpos($html, '<script') !== false) {
// Add the data-cookieconsent attribute
$html = str_replace('<script ', '<script data-cookieconsent="ignore" ', $html);
}
return $html;
}, 10, 2);