Add ability to exclude ad units from active refresh
davidrgreen opened this issue · 1 comments
davidrgreen commented
Is your enhancement related to a problem? Please describe.
Currently the plugin supports excluding based on advertiser ID, but there are instances where we may want to completely exclude a specific ad unit from refreshing instead of excluding all the possible advertiser IDs that can display in it.
Describe the solution you'd like
Backend:
- Add an additional field to the plugin's settings page that will accept a list of slot element IDs(strings). The slot element ID is the third argument passed to
googletag.pubads().defineSlot()
, which is the ID of the DIV that will contain the defined ad slot. - Include the list of excluded slot element IDs within the
wp_localize_script()
call withinincludes/functions/core.php
.
Frontend:
- We already obtain the slot element ID within the
initializeSlotData()
function. When the slot element ID is obtained there we can check it against the list of excluded slot element IDs passed into the window.AdRefreshControl object.
jeffpaul commented
Noting that @elliott-stocks is working on this.