WordPress
The simplest route is a header-injection plugin (WPCode, Insert Headers and Footers) with the tag in the Header slot:
<script src="https://kindnod.com/kindnod.js" data-site="YOUR_SITE_KEY" async></script>
Or add to your theme's functions.php:
add_action('wp_head', function () {
echo '<script src="https://kindnod.com/kindnod.js" data-site="YOUR_SITE_KEY" async></script>';
}, 1);
Blocking plugins' scripts
WordPress plugins print their own script tags, so you cannot add type="text/plain" by hand. Two options:
- Run analytics and pixels through Google Tag Manager with Consent Mode, and let the plugins that only add GTM stay as they are.
- Use the filter below to rewrite known handles to blocked scripts:
add_filter('script_loader_tag', function ($tag, $handle) {
$block = ['google-analytics' => 'statistics', 'facebook-pixel' => 'marketing', 'hotjar' => 'statistics'];
if (isset($block[$handle])) {
$tag = str_replace('<script ', '<script type="text/plain" data-kindnod="' . $block[$handle] . '" ', $tag);
}
return $tag;
}, 10, 2);
Removing Cookiebot's plugin
Deactivate and delete the Cookiebot plugin after verifying Kindnod is live. Its blocked-script markup (data-cookieconsent) keeps working under Kindnod if any remains in your theme.