Getting store analytics when building store with Storefront API and SDK

I’ve built my store on Wordpress using the Storefront API.

My analytics only track in the actual checkout process (because it’s in Shopify’s system).

How do I get the analytics over on my actual site?

The only thing I can find is that there seem to be a deprecated analytics API. But there must be an answer — why else would we have a Storefront API?