Hi guys! Hope you all had a great weekend!
I am trying to track adblocker traffic, and I have found this code down here. My question is, how do I add this to Generatepress theme, and would like to ask if you by any means know a quick and safe way to do this? Thank you! 🙂
if(typeof adsbygoogle !== \”undefined\”) {
window.addEventListener(\’load\’, function() {
if(typeof ga !== \”undefined\”) {
if(typeof adsbygoogle.loaded === \”undefined\”) {
ga(\’send\’, \’event\’, \’AdSense\’, \’Ads blocked\’, { \”nonInteraction\”: 1 });
} else {
ga(\’send\’, \’event\’, \’AdSense\’, \’Ads not blocked\’, { \”nonInteraction\”: 1 });
}
}
}, false);
}