Hello,
I am requesting your help regarding traffic analytics that does not show up despite no obvious errors in logs.
Here a sumup of the configuration:
- docker stack with 4 services working:
activitypub,db,ghost,traffic-analytics - free configuration with tinybird (I receive datas on it)
- nginx proxy manager as proxy, out of the box of the ghost stack
- service
traffic-analyticsexposure is not on 3000 port and nginx proxy can access to it throught another port (<TRAFFIC-ANALYTICS_PORT>) - everything else is working fine on my Ghost website
Everything seems to work fine but as final step, traffic analytics remains empty. I check services logs during a simple request and I have this output:
2026-02-07T19:40:00.983509405Z traffic-analyticsg@app03 | {"level":30,"timestamp":{"seconds":1770493200,"nanos":982000000},"pid":1,"hostname":"6683fb20c910","reqId":"req-l","event":"IncomingRequest","httpRequest":{"requestMethod":"POST","requestUrl":"/api/v1/page_hit?name=analytics_events","userAgent":"<USER_AGENT>","remoteIp":"<CLIENT_IP>","referer":"https://<DOMAIN.NAME>/","protocol":"HTTPS/1.1","requestSize":"638"}}
2026-02-07T19:40:01.138283901Z traffic-analyticsg@app03 | {"level":30,"timestamp":{"seconds":1770493201,"nanos":137000000},"pid":1,"hostname":"6683fb20c910","reqId":"req-l","source":"http://localhost:3000/local-proxy","message":"fetching from remote server"}
2026-02-07T19:40:01.144209755Z traffic-analyticsg@app03 | {"level":30,"timestamp":{"seconds":1770493201,"nanos":143000000},"pid":1,"hostname":"6683fb20c910","reqId":"req-m","event":"IncomingRequest","httpRequest":{"requestMethod":"POST","requestUrl":"/local-proxy?name=analytics_events","userAgent":"<USER_AGENT>","remoteIp":"<CLIENT_IP>","referer":"https://<DOMAIN.NAME>/","protocol":"HTTPS/1.1","requestSize":"841"}}
2026-02-07T19:40:01.145981268Z traffic-analyticsg@app03 | {"level":30,"timestamp":{"seconds":1770493201,"nanos":145000000},"pid":1,"hostname":"6683fb20c910","reqId":"req-m","event":"RequestCompleted","httpRequest":{"requestMethod":"POST","requestUrl":"/local-proxy?name=analytics_events","userAgent":"<USER_AGENT>","remoteIp":"<CLIENT_IP>","referer":"https://<DOMAIN.NAME>/","protocol":"HTTPS/1.1","requestSize":"841","responseSize":"34","status":200,"latency":"0.001636522s"}}
2026-02-07T19:40:01.152911400Z traffic-analyticsg@app03 | {"level":30,"timestamp":{"seconds":1770493201,"nanos":146000000},"pid":1,"hostname":"6683fb20c910","reqId":"req-l","message":"response received"}
2026-02-07T19:40:01.152952767Z traffic-analyticsg@app03 | {"level":30,"timestamp":{"seconds":1770493201,"nanos":152000000},"pid":1,"hostname":"6683fb20c910","reqId":"req-l","event":"RequestCompleted","httpRequest":{"requestMethod":"POST","requestUrl":"/api/v1/page_hit?name=analytics_events","userAgent":"<USER_AGENT>","remoteIp":"<CLIENT_IP>","referer":"https://<DOMAIN.NAME>/","protocol":"HTTPS/1.1","requestSize":"638","responseSize":"34","status":200,"latency":"0.170373080s"}}
Furthermore, I checked with developer tools on my web browser when navigating on my Ghost website and I did not see any deny/error/forbidden logs or anything like that.
Finally here the reverse proxy configuration (in my last test I reuse the configuration expose in this post Analyticts Are Not Logging - #6 by justinomics):
location ~ ^/.ghost/analytics/(.*)$ {
proxy_pass http://<TRAFFIC-ANALYTICS_SERVER-IP>:<TRAFFIC-ANALYTICS_PORT>/$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;
}
I am open to test things if you think it may help to understand the emptyness of analytics. Any helps are welcome :)