Anti-Adblock Integration for WordPress (Pop-Under and Autotag)
- Last updated on September 11, 2024 at 10:48 AM
Note: This setup may require some technical/development skills, but no worries, we've got you covered!
This article explains how to integrate the Pop-Under and Autotag zone scripts for WordPress to support the monetization of Adblock traffic.
It consists of two sections:
- Prerequisites to get started
- Anti-Adblock script integration for WordPress
Prerequisites to get started
Before getting started, please ensure:
- Your website has been verified in Adcash's publisher panel;
- You have created a zone for your website with the intended ad format with the "Supporting monetization of Adblock Traffic" option.
Refer to the article Anti-Adblock Integration for Pop-Under and Autotag zones for more details.
Anti-Adblock script integration for WordPress
Navigate to https://github.com/adcash/customer-scripts/tree/master/wordpress/v2_adcash_lib and follow the steps below:
1. Download the latest Adcash WordPress plugin – "adblock.zip"
2. Go to your WordPress Admin panel and click the Plugins tab in the menu.
4. Click the Upload Plugin button and select the downloaded "adblock.zip" plugin.
6. Click Install Now.
7. Click the Activate Plugin button.
8. Go to the Settings tab on the menu and click Adcash Adblock.
9. On the Adcash Adblock Options page, set the "Cache Period in minutes" for the library source. We recommend keeping the default value of 60.
10. Click on Save Changes.
If integration is successful, you should be able to trigger ads with the enabled Adblock extension on all pages.
After completing the steps, you have two options: to run ads on a single page or all pages.
Run ads on a single page
1. Go to WordPress Admin panel > Pages and select the desired page.
2. Click on the Toggle Block Inserter and add a Custom HTML block.
3. Inside the block, i.e., to run Pop with zone id = '1234567', use the following code:
<script>
aclib.runPop({ zoneId: '1234567' });
</script>
Example for running Autotag with zone id = 'ab1cdefg23':
<script>
aclib.runAutoTag({ zoneId: 'ab1cdefg23' });
</script>
3. Click Update.
Run ads on all pages
1. Go to WordPress Admin panel > Tools > Theme File Editor.
2. Find the part with, i.e., header.html, and click on it inside the wrapper element, i.e., to run Pop with zone id = '1234567', use the following code:
<script>
aclib.runPop({ zoneId: '1234567' });
</script>
Example for running Autotag zone with zone id = 'ab1cdefg23':
<script>
aclib.runAutoTag({ zoneId: 'ab1cdefg23' });
</script>
3. Click Update File.
Please do not hesitate to get in touch with us for setup assistance. Use our support chat or reach out via contact@adcash.com.