Forgive the double post, I stupidly deleted my first post by accident.
I’m getting the “batteries all included” Docker setup going on my local server. I have the entire stack working but with analytics, I keep seeing 404 errors and nothing getting logged. The error in the Docker log for Ghost is INFO "POST /.ghost/analytics/api/v1/page_hit?name=analytics_events" 404 11ms and I never see anything past 0 on my Analytics page.
I’ve double checked the tokens and URLs in the .env file. I’ve also made sure the top area in the .env file has analytics uncommented. Docker down and up spins up the analytics login, deploy, and sync containers, leaving the analytics container running. Nothing seems to have an error.
Hoping there’s some help I can get about this. Thank you.
If the Ghost container is logging that, I think that’s your problem. Those analytics requests are supposed to be going over to the tinybird container. You may need to check your caddy configuration – sounds like you’re maybe missing something?
Thanks for the reply. I went through my setup and realized I needed to update Caddy with the Snippet information (I use Caddy already, so I can’t use the included one with from Ghost as they’d both try to bind to port 80).
Now I’m seeing a 200 response inside the Ghost container, but still nothing is showing in the admin dashboard for any traffic to my site:
[2025-09-16 13:39:29] INFO "GET /ghost/api/admin/stats/posts/68c84b4b7971090001a2d222/stats/" 200 117ms
Below is my dashboard after I tried multiple times just now to hit the site and nothing is registering. Is there a delay or job I need to run? I feel like I’m getting closer on this but I’m not quite there yet.
Was it solved by waiting?
Encountered a simular issue, only with nginx proxy manager.
I think the data is not being send to Tinybird, but can’t find out why yet.
Ah, something is communicating:
ghost-1 | [2025-10-03 16:30:07] ERROR Error in Tinybird API request to https://api.tinybird.co/v0/pipes/api_top_pages.json?site_uuid=xxxxxxxxx&date_from=2024-08-14&post_uuid=xxxxxxxxx: Response code 429 (Too Many Requests)
Thought I’d lend a hand here as I just went through something similar with nginx. Basically, Ghost isn’t being told to include the required name=analytics_events query parameter in its analytics tracking requests. The traffic-analytics service requires this parameter to know which Tinybird datasource to send the data to.
To fix it you need to add a tinybird__tracker__endpoint in your .env file to include ?name=analytics_events, allowing Ghost to forward properly formatted requests to Tinybird.
So in my .env file I added this line after the “DOMAIN=” part:
tinybird__tracker__endpoint=https://mydomain.com/.ghost/analytics/api/v1/page_hit?name=analytics_events
In compose.yml in the traffic-analytics section, I added the relevant port:
...
expose:
- "3000"
ports:
- "3000:3000" # Add this line
Finally, in Nginx I added this block:
# Proxy Ghost analytics traffic to Traffic Analytics service
location ~ ^/.ghost/analytics/(.*)$ {
proxy_pass http://127.0.0.1:3000/$1$is_args$args;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_buffering off;
proxy_cache_bypass $http_upgrade;
}
Hope that helps someone!