Maybe a little spot-check here…
I was given this for advertising:
<script src="//m.servedby-buysellads.com/monetization.js" type="text/javascript"></script>
<script>
(function(){
if(typeof _bsa !== 'undefined' && _bsa) {
_bsa.init('fancybar', 'CKYDV2QM', 'placement:thebitcoinpub');
}
})();
</script>
And I’d like to show this code to everyone except those who are in the Group “patrons” (using the Patreon Plugin).
Does this look right?
<script src="//m.servedby-buysellads.com/monetization.js" type="text/javascript"></script>
<script>
const user = Discourse.User.current();
(function(){
if ((typeof _bsa !== 'undefined' && _bsa && user === null) || typeof _bsa !== 'undefined' && _bsa && user !== null && user.primary_group_name !== "patrons") {
_bsa.init('fancybar', 'CKYDV2QM', 'placement:thebitcoinpub'); }
}
}
})();
</script>
This doesn’t seem to give the result that I’m looking for… is there a better way of doing this?
Thanks in advance!