This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

How to add adsense replacement script

10 years ago · Last reply by Support Assistants 10 years ago

Dear SO,

I recently implemented adsense to my website hearthdecko.com
Now I would like to add a message that’s being shown whenever someone is using adblocker.
I found this solution: http://www.labnol.org/internet/alternate-content-for-adblock/28602/ and tried adding the code to the page builder. That did not work.

Q1. Where/how can I add a script like this to a specific page and make it so a replacement message is presented?

Q2. On my home page I only have an adsense block in the sidebar. Can the above be implemented on the sb widget too?

Thanks and with kind regards

Bucko

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

3
  1. Support Assistants 10 years, 1 month ago

    Hi Bucko

    Thanks for your question.

    1. Use this plugin: https://wordpress.org/plugins/insert-headers-and-footers/. It’ll provide a field that’ll let you insert a script in the footer.

    2. I just skimmed the labnol.org link but it looks like that script replaces all adds with a note. Perhaps give a try, see what happens and report back.

  2. Bucko 10 years, 1 month ago

    Hi there,

    thanks for your reply. However I took the steps and I don’t get the replacement text when I activate addBlocker. Not sure if this is the script missbehaving or anything else. At least now I know how to put in script in the header/footer so thanks for that. Unless you have any extra pointers for me you can consider this call closed.

    thanks again!
    Bucko

  3. Support Assistants 10 years, 1 month ago

    Thanks for the update. Sorry to hear this didn’t work. Perhaps, look to a plugin solution:

    https://wordpress.org/plugins/search.php?type=term&q=adblocker

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread