All Questions

Coding

How would I go about testing the set up?

Question for web devs. I’ve got Google analytics set up, but I think it’s not tracking all users, because I’ve linked some events to a Notion DB. Sometimes I get a new entry in Notion, while there has not been any user according to GA.

Any other analytics software you can recommend?

author Jasper Schoormans

Reply
15 Answers

Lots of people have ad blocks and ad blocks block most analytics. To get around this I use plausible self hosted and a nginx rewrite.

writen by Iain Cambridge

So plausible.js will be blocked but if I rewrite info.js to plausible.js it’ll work.

writen by Iain Cambridge



location /info.js {
proxy_set_header   X-Forwarded-For $remote_addr;
proxy_set_header   Host $http_host;
proxy_pass         '<http8000/js/plausible.js>';
sub_filter_types application/javascript;
sub_filter '/api/event' '/api/info';
sub_filter_once on;
}


location /api/info {
proxy_set_header   X-Forwarded-For $remote_addr;
proxy_set_header   Host $http_host;
proxy_pass         '<http8000/api/event>';
}```
Is what I use for nginx to bypass blockers

writen by Iain Cambridge

ok thanks Iain! That makes sense… Its good to know that the ad blocks block analytics as well… I use nginx as well, might copy your solution 🤔

writen by Jasper Schoormans

I do the same, except I use a cloudfront dist to make the plausible js appear to come from my own domain

writen by Dries

This is fast becoming too difficult for me

writen by Jasper Schoormans

Dries you’ll find that ‘plausible.js’ is blocked by many no matter what domain it comes from

writen by Iain Cambridge

Yeah, just realized that when reading your comment

writen by Dries

They also block the event api call so I bypass that too

writen by Iain Cambridge

Something to address at some other time, I use this on 200 domains, so not getting into it now

writen by Dries

200 domains?!?!?!?!?

writen by Jasper Schoormans

264 to be precise

writen by Dries

Ah, wow I didn’t even realize that the filename “plausible.js” was blocked, even with proxying. Thanks for that tip.

writen by Matt Morris

Do you want to ask a question?


Related Questions