Plausible answers POST /api/event with "202 Accepted" almost every time – even when it drops the event. The browser isn't supposed to see an error. Whether an event was counted is shown by the header x-plausible-dropped.
Symptom
curl -s -i -X POST http://plausible.lab:8000/api/event -H "User-Agent: $UA" \
-H 'Content-Type: application/json' \
-d '{"name":"pageview","url":"http://falsch.example/","domain":"falsch.example"}' \
| grep -iE '^HTTP|dropped'
HTTP/1.1 202 Accepted
x-plausible-dropped: 1
Status 202 only means: accepted. Only a row in events_v2 proves the event was counted.
Diagnosis
Send an event by hand and look at the header, then check ClickHouse.
UA="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0"
curl -s -w ' %{http_code}\n' -X POST http://plausible.lab:8000/api/event \
-H "User-Agent: $UA" -H 'X-Forwarded-For: 203.0.113.10' \
-H 'Content-Type: application/json' \
-d '{"name":"pageview","url":"http://itdrills.com/books/","domain":"itdrills.com"}'
sleep 5
cd ~/plausible/ce
docker compose exec -T plausible_events_db clickhouse-client -d plausible_events_db \
--query "select name, hostname, pathname, user_id from events_v2 format TSV"
ok 202
pageview itdrills.com /books/ 17507384468120316438
Causes
DomainUnknown domain
The domain in the event doesn't exist as a site in Plausible. The event is dropped silently.
BotKnown bot user agent
Known bots such as Googlebot are dropped. curl with its default user agent, on the other hand, doesn't count as a bot.
curl -s -i -X POST http://plausible.lab:8000/api/event \
-H 'User-Agent: Googlebot/2.1 (+http://www.google.com/bot.html)' \
-H 'Content-Type: application/json' \
-d '{"name":"pageview","url":"http://itdrills.com/","domain":"itdrills.com"}' \
| grep -iE '^HTTP|dropped'
HTTP/1.1 202 Accepted
x-plausible-dropped: 1ShieldA shield blocks the IP or hostname
Shields drop events on arrival. As soon as there is one hostname rule, it's an allow list: only exactly those hostnames are counted.
cd ~/plausible/ce docker compose exec -T plausible_db psql -U postgres -d plausible_db \ -tAc "select hostname, hostname_pattern, action from shield_rules_hostname" www.itdrills.com|^www\.itdrills\.com$|allow
400Not dropped – a broken request
If required fields are missing, Plausible answers 400 and says why.
curl -s -w ' %{http_code}\n' -X POST http://plausible.lab:8000/api/event \
-H "User-Agent: $UA" -H 'Content-Type: application/json' -d '{"name":"pageview"}'
{"errors":{"domain":["can't be blank"],"url":["is required"]}} 400Fix
D='{"name":"pageview","url":"http://www.itdrills.com/www/","domain":"www.itdrills.com"}'
curl -s -i -X POST http://plausible.lab:8000/api/event -H "User-Agent: $UA" \
-H 'Content-Type: application/json' -d "$D" | grep -ciE 'dropped'
0
Don't: Looking at the status code. 202 also comes back for dropped events – the header is what counts.
Plausible Analytics, day 2: send pageviews by hand, follow them into ClickHouse and spot dropped events by their header.
Go to day 2 →
FAQ
Does monitoring that fetches my page with curl get counted?
No – it doesn't run JavaScript, so it never sends an event. A curl straight to /api/event, however, does count. For liveness checks use /api/health, which stores nothing.
Are www.example.com and example.com two sites?
No. Plausible strips www. – both are the same site.