Currently, the content behind every door is loaded on request to verify if someone is allowed to access a specific day. This is to prevent people from peaking at the page source to see the rewards.
In your code you have the script tag loading the adsbygoogle.js
file, but it won’t be initialised because the page has already finished loading before the content is there. So what you could do is:
Is add the following to your functions.php:
function add_google_adsense(){
?>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
const days = document.querySelectorAll('.superac-day');
days.forEach(el => el.addEventListener('click', event => {
setTimeout(function() {
return (adsbygoogle = window.adsbygoogle || []).push({});
}, 1000);
}));
</script>
<?php
}
add_action( 'wp_footer', 'add_google_adsense' );
You would then only keep the HTML part <ins ...></ins>
inside Adinserter.
I’ll see if this is something I can improve on in a future version of the plugin.