Maybe this is trivial, but I haven't found anything meaningful or I didn't know where to look...
(How) is it possible to to send a curl / whatever command as soon as a certain path is requested?
Something along these lines, but that would actually work:
location / {
curl --data 'v=1&t=pageview&tid=UA-XXXXXXXX-X&cid=123&dp=hit' https://google-analytics.com/collect
}