Analytics: how to register the static content served by my CDN (Cloudflare)

I'm considering enabling Cloudflare for my site, which will make static content load from its servers instead of mine. If that is the case, how can I calculate the request in our analysis platform for that piece of static content? How can I know how many times it was downloaded?

We currently manage this side of the server. That is, when someone requests a PDF, we use an API to tell that in our analysis tool. But we will never see the application if things work correctly, so … how to handle this?