plausible/wordpress

Allow configurable base filename for selfhosted to support adblock proxy

Opened this issue · 0 comments

Even the name plausible in the js script is enough to make adblockers (uBlock) block the script
So even if you use the proxy setup on your local site, it still blocks.
Once you change the file name and let the proxy map do the reverse translation for you, it works like a charm.

location ~ /js/stats.(?<target>(.*?)).js {
        proxy_pass https://stats.example.com/js/plausible.$target.js?ver=2.1.4;
        proxy_set_header Host stats.example.com;
 }

What I did was change:

$file_name = 'plausible';
to contain stats instead of plausible, it would be nice to have this configurable.