uBlock / EasyPrivacy has blocked even the custom domain #610
Replies: 17 comments 78 replies
-
thanks for reaching out @KristerV! yeah, that's known behaviour. Firefox with uBlock Origin can block the custom domain. This doesn't happen on Chrome and Safari though even when uBlock Origin is enabled so it's a Firefox thing only. so unless Firefox stands for huge amount of your traffic I wouldn't worry too much about it but Uku may share advice on other short term measures you could take yourself. on a relevant note, we're working on introducing a different setup for custom domains to speed up the loading time across the globe via a CDN which indirectly will also make the custom domain unblockable even on Firefox. cannot promise any timeline on when this will be done but we've already started exploring the different options for this. |
Beta Was this translation helpful? Give feedback.
-
This can work of course, but there are alternatives.
This would work, you'd of course have to update the file manually for new features etc, but the script is backwards compatible. All you'd need to ensure is that in the file the URL it posts to is the correct one (it's a string in the file) - and if you download from the path you're loading normally, this'd be there correctly.
You can do this too. The things to keep in mind would be TLS and CSP - but if you just straight rewrite on the Nginx side that should work perfectly.
From what I've seen the Plausible IP seems static, but this may not be a super permanent solution given the IP could of course change on a whim for a variety of reasons and I'm unsure if the plausible host would actually route correctly if requested via IP as opposed to the URL.
I think it would be. uBlock only bases it's rules on the URI, not on the content itself, but there is the potential for uBlock blocking the events being sent too (I'm unsure if it actually does block POSTs, I haven't looked that closely, but I can take a look if you'd like) - but you could circumvent this too with method 2 by changing the URL that events are sent to to your own (by changing the URL string in the js file), and rewriting them to the correct URL through nginx or basic rewrites. If you have more questions feel free to ask :D Edit: From a quick look here, it seems Easy privacy does not block the XHR requests to actually send events once the script is loaded, but there's nothing stopping them from adding it in the future, so they could start getting blocked at any time. (uBlock does support this sort of blocking) |
Beta Was this translation helpful? Give feedback.
-
Only thing I would add is that configuring your own nginx/caddy/apache proxy is by far the most effective and future-proof solution. If API calls are an issue, you can proxy them as well no problem. Since your proxy server won't be a known IP or domain like plausible.io, it will not be blocked by anyone anywhere. And since you're not actually hosting anything, just proxying, it is safe in terms of future updates to the script etc. Not to discourage contributions but the custom domain infrastructure is probably the most difficult area of Plausible to work on. And like I said in the other issue, we will rebuild it from scratch this year. If you're open to working on other parts of the app it would definitely make things a lot easier. We have a list of tasks that I feel would be a good first contribution here: https://github.com/plausible/analytics/projects/1. What do you think of those? |
Beta Was this translation helpful? Give feedback.
-
Another email arrived about this topic today this time with a similar problem on Brave which now blocks Plausible custom domain out of the box with the default settings: "we’re customers at Plausible. Since some time Brave browser blocks the Plausible script. We serve it via custom DNS. Changing the CNAME has no effect, it still gets blocked. So it does not seem related to the domain name. Do you have any workarounds you can recommend" |
Beta Was this translation helpful? Give feedback.
-
Hmm if this is actually becoming more widespread (especially with no user-configuration) maybe there's a potential to improve the solution before of the CDN swap too. @ukutaht is there a reason you elected to use CNAME redirection for the custom domains solution? I wonder if doing them directly though setting A records and using Nginx's |
Beta Was this translation helpful? Give feedback.
-
So we added this to our Nginx and the script loads just fine now:
However.. the requests are still blocked: So we have 2 options going forward:
edit: turns out that Nginx module was already installed so going that route. |
Beta Was this translation helpful? Give feedback.
-
Working solution: We made a new subdomain plaus.mydomain.com and this is the Nginx config behind it:
You need this Nginx module for the What it does is:
@ukutaht can you please check that the header setup makes sense? What headers does Plausible need? |
Beta Was this translation helpful? Give feedback.
-
The thing is that even www.plausible.io is included in most anti-tracking lists, so when using a vpn with adblock enabled or with pi-hole even plausible.io is not reachable |
Beta Was this translation helpful? Give feedback.
-
Hello, Did you tried to reach Brave.com asking for them to remove the blocking because you do not track user personal informations ? Does it worth trying to reach them ? |
Beta Was this translation helpful? Give feedback.
-
Also when when selfhosting I ran into multiple issues. First it was triggered by the name of the script (plausible.js), then by the url it was connecting to (plausible.[domain.tld]). After renaming the script to "stats.js" and changing the plausible URL to data.domain.tld I successfully bypassed the uBlock Origin Easylist. Let's hope the triggerwords won't change in the future too often. I know the main problem is about the cloud version, but I found this issue googling and it helped me troubleshooting my issue. Then maybe could this comment help somebody else as well. |
Beta Was this translation helpful? Give feedback.
-
If you're concerned about adblockers, we now have instructions on how to proxy our script. See https://plausible.io/docs/proxy/introduction |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot @metmarkosaric !! Happy to let you know that my gohugo-plausible module is now able to manage this proxying (plus warning about deprecated CNAME). |
Beta Was this translation helpful? Give feedback.
-
Just to confirm @metmarkosaric If we want outbound-link, the redirect file should read
and the script will remains Right ?? |
Beta Was this translation helpful? Give feedback.
-
Warning for people that are using a proxy setup like what @KristerV posted in #610 (comment): please double-check that it's working and it may need some adjustment. We made a change so that the hostname where to post analytics data isn't baked into the script anymore. Instead, it's pulled from the You can fix it by supplying Alternatively, you can set up a proxy using our new proxy guides section in the docs: https://plausible.io/docs/proxy/introduction. |
Beta Was this translation helpful? Give feedback.
-
I'm testing the proxy solution on CloudFront, using a custom origin and behavior. I'm concerned that the visitor IP and User-Agent gets lost when the request hitting you is from a CloudFront edge server, and not the actual visitor. Seems that you need IP and User-Agent for "uniqueness" and country. This is next to impossible for me to verify. I've set up a test, which does seem to work, but I am unable to verify that country and unique users are based on the actual user and not the CloudFront edge server. Suggestions? |
Beta Was this translation helpful? Give feedback.
-
Here's a quick & dirty way to get it running on App Engine Flex / Flask. Didn't have the time to make it prettier but things seems to work.
|
Beta Was this translation helpful? Give feedback.
-
Is this a regression? Or do I need to use a special script to support rewriting the api path? |
Beta Was this translation helpful? Give feedback.
-
hey
I have a tracking script on hnsince.com (code is Elixir and OS). I've set up a custom domain for the script at stats.randomforest.ee. Yet uBlock still blocks the script in Firefox.
So uBlock actually looks at the CNAME and blocks the script anyway.
So what workarounds are there? My ideas:
With 2 and 3: would these be enough or are the requests to plausible.io (after the script is running) also blocked by uBlock?
Beta Was this translation helpful? Give feedback.
All reactions