Netlify Analytics API

I’m toying with an idea of moving my client’s news portal site to JAMstack (Ghost + 11ty + Netlify). There are a couple of things that I’d need to sort out before that endeavor, but my biggest problem is the requirement to have the “Most popular articles” widget.
I was hoping to get that information from Netlify Analytics, and only in build-time since the actual count is not important, but it seems that there is no API available for Netlify Analytics.

Have I missed something or I’ll have to pull my sleeves up and build something on my own with Firebase or FaunaDB?


Hey there,

That sounds like a great idea - at the moment, however, there isn’t an API endpoint you can query per se to pull the data and transform it in some way. We have an open feature request for this from a few folks, and I have added your voice to that issue, but i don’t have an ETA on when we might work on this at the moment.

There is some additional data and a workaround in this thread you should read, but it is a bit experimental. Nevertheless, it might work for your purposes.

Thank you @perry for your time and effort. I’ll follow up your suggestion.


1 Like

no problem. We will absolutely follow up with you should the engineering time decide to implement a different API - I can definitely see a use case for that.