Affiliate links blocked by adblockers

I received this morning an email from a customer:

I came from phpcrudgenerator.com - and there ist top right the “Buy now” link
which links to https://1.envato.market/xabod ← and THAT is refused by several of my browsers
as it is in one of the github adblock lists.
Even if I allowed, they asked me to enable 3rd party cookies and so on…

After some research, it turns out that 1.envato.market is registered in certain lists, for example https://raw.githubusercontent.com/ph00lt0/blocklists/master/pihole-blocklist.txt

So all of you who use affiliate links have a choice between using affiliate links and losing buyers, or no longer using them and losing your affiliate income.

Unless anyone has a better solution?

Yes, this is a serious issue. I previously mentioned it in one of the forum threads. Many add-ons, like Ghostery, block links from impact.com, often resulting in an “Access Denied” error or a blank page.

If you’re looking for a workaround, you can try this: check if the following URL is accessible in the background: https://widgets.outbrain.com/outbrain.js. If it’s accessible, it means there’s no adblocker, and you can display the affiliate link. Otherwise, you might need to show the original link.

let isAdBlockerDetected = false; // Initialize the variable
async function detectAdBlock() {
    const out_brain_url = "https://widgets.outbrain.com/outbrain.js";
    try {
        const response = await fetch(new Request(out_brain_url));
        if (!response.ok) {
            isAdBlockerDetected = true;
        }
    } catch (e) {
        isAdBlockerDetected = true; // If an error occurs, assume adblock is detected
    }

    console.log(isAdBlockerDetected ? "Adblocker detected" : "No adblocker detected");
    return isAdBlockerDetected; // You can use this value for further actions
}

1 Like