All Collections
How to...
How to integrate OnclickAds code with Anti-Adblock support? (JS and PHP integration)
How to integrate OnclickAds code with Anti-Adblock support? (JS and PHP integration)
A
Written by Admin
Updated over a week ago


If you website is based on Wordpress or Blogspot - please, check the options above. Otherwise, you can choose from two versions of Anti-Adblock codes - Javascript and PHP.

If your hosting provider supports PHP, we strongly recommend to use PHP version of Anti-Adblock code. Otherwise, you'll be forced to update the JS-code manually every time when new domains get banned by AdBlock.

Integrating Javascript Anti-Adblock ad channel code

Javascript code can be used on any hosts (including free services), but need to be replaced manually every time after getting our domains in Adblocking software filters (at least once per week).

Copy the Javascript code

Paste it to the source code of your website pages right after the <body> tag.

Do not use Standard & Anti-Adblock code on the same page! Anti-Adblock code works for all users.
โ€‹

Integrating PHP Anti-Adblock ad channel code

It would need some development skills to implement such ad code, but it provides you with unlimited anti-adblock support for an ad channel without need to replace your code.

  1. Download the PHP file pa_antiadblock_(your zone ID).php containing your OnClick ads code with Anti-AdBlock support


2. Upload it on your server to the directory where your website PHP files are located

3. Insert this line below into your .php file where you would normally put an ad serving tag (the best placement for Onclick ads is right after the <head> tag)

echo include_once (dirname(__FILE__) . '/pa_antiadblock_(your zone ID).php');

Did this answer your question?