Add financed site

Hi,

I am running an add financed site, and I need som advice on how to put in a snippet or something else that tells my users that they have to allow this site in there add blocking app .
Can anybody help me with that :slight_smile:

Regards Peter

oh you mean advertising blocking as in “ad blocking”? Ok. The add misspelling was a little confusing.

Well, there are a few ways to do this, I believe.

You could use Joe’s call to action stack (which appears after a period of time).

Thank you @devananda

Sorry about the misspelling. I will look into the call-to-action stack

Regards Peter

In addition to the call to action stack, there’s the Notify stack from Doobox, with 50% off at the moment too.

1 Like

@devananda

I have watched the video for call-to-action. But i don’t believe that this is what I really need. What I need is a snippet that checks whether the user is using adblock and if so to tells the user to allow this site in adblock.

I believe that call-to-action and Notify stack are both thought the other way around - I mean to increase some customer interest in order to get more customers and more trade. But perhaps I am wrong here :wink:

@peterkroman

Offered without warranty. I make no comment as it to it’s correctness or the rights or wrongs of hassling people about their ad-blocking preferences. Drives me potty when I get messages like this personally… but there you go.

So, for a bit of fun…

This is a snippet I picked up somewhere online a while back. It might at least get you started.

Add this to a html stack at the bottom of your page. Remember to clear/ignore formatting etc.

<div class="afs_ads">&nbsp;</div>
<script>
(function() {
    var message = "It appears that you have ad blocker software enabled! Please disable it for this site and help support our work!";

        // Define a function for showing the message.
        // Set a timeout of 2 seconds to give adblocker
        // a chance to do its thing
        var tryMessage = function() {
            setTimeout(function() {
                if(!document.getElementsByClassName) return;
                var ads = document.getElementsByClassName('afs_ads'),
                    ad  = ads[ads.length - 1];

                if(!ad
                    || ad.innerHTML.length == 0
                    || ad.clientHeight === 0) {
                    alert(message);
                    //window.location.href = '[URL of the donate page. Remove the two slashes at the start of thsi line to enable.]';
                } else {
                    ad.style.display = 'none';
                }

            }, 2000);
        }

        /* Attach a listener for page load ... then show the message */
        if(window.addEventListener) {
            window.addEventListener('load', tryMessage, false);
        } else {
            window.attachEvent('onload', tryMessage); //IE
        }
})();
</script>
2 Likes

Thanks @kryten

This is what i need :slight_smile:
I will work with that.

Regards Peter

@kryten

This surely works. But the message only shows once. I would like it to show every time a user enters the page if adblock is enabled on thus domain. Can you help me fixing that :slight_smile:

Regards Peter

I think that that this JS only works if the user has AdBlock Plus installed. There are many adblocking plugins. I don’t believe that it will be possible to detect all of them.

1 Like

OK - Thanks. I believe that AdBlock Plus is the most used, so I am good now. Thanks for your help.