-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking stopped working - Plausible requests sent to wrong domain #1061
Comments
This breaking change seems to be caused by the introduction of My previous setup: allaboutberlin.com/whoisthere.js -> stats.allaboutberlin.com/js/plausible.js -> plausible.io/js/plausible.js The requests usually went to stats.allaboutberlin.com/api/event, but the introduction of data-api broke it. |
Yes, we moved to |
I have fixed it now, but a warning would have been nice. I only noticed because of the sudden, massive dip in tracked visits. |
My apologies. I did consider declaring this a breaking change and moving to new versioned filename ( Sorry you were a casualty in this move. I will add a warning to the other threads about proxy setups where people might be running Plausible in similar ways. I'm not used to so many people using my work in ways I can't even predict :) |
Sounds like a case where Hyrum's law would apply 😃
I self-host so I always look at the script before updating. But it would be awesome if changes in the script could be in the changelog! |
It has been a few days since I implemented the
|
Hey - looks like all the traffic is being tracked but our backend is getting the wrong IP address. Looks to me like this is because our custom domain server wasn't intended to be behind a proxy when I first set it up. It always takes the I've changed it now so it takes your |
Thanks for the fast reply. I swapped the custom domain for plausible.io after posting this, suspecting that it could be the cause. I realise that we're charting new territory and that there should be bumps along the way, and I really appreciate your help. Hopefully, everything should work fine today. I'll keep you posted. |
Yeah going straight to plausible.io/api/event is also a potential fix - the custom domain isn't really needed anymore once you have a proxy set up. |
Quick update: it's working as expected now. The measured numbers are significantly higher than yesterday, and match the normal trend. I think that these nginx rules would be a useful addition to your documentation: SolutionOn the page:
In the nginx config:
|
thanks @nicbou! we'll include those instructions! |
Thanks again @nicbou. I'm adjusting this setup a bit for our documentation. What's the reasoning behind this block?
|
My initial setup only proxied the plausible.js script. I loaded the script from the custom domain - not plausible.io - because I wanted the API call to use that custom domain. If I didn't set these, I got SSL errors between the nginx reverse proxy and Plausible. I am not sure if this is necessary anymore. |
Ah I see. I'll probably remove them. Thanks! |
@metmarkosaric this is the piece that made it work for me for my hosted instance(hi from the fediverse), but instead of plausible.io I put mine |
Prerequisites
Bug report
Since a day or more, the tracking script stopped working. Requests are made to https://allaboutberlin.com/api/event instead of either plausible.io/api/event or stats.allaboutberlin.com/api/event.
This follows a change in the plausible.outbound-links.js scripts, since it does not seem to contain either domain anymore. For some reason, it uses currentScript.src.origin as the domain.
Expected behavior
Plausible requests should be made to the correct domain. Script updates should not break tracking on my website.
The text was updated successfully, but these errors were encountered: