I'm interested in that too. As far as I know there is no way of getting the Analytics API working outside ShopifyQL. Plus running ShopifyQL in an embedded app like ours seems to be hard. Correct me if I'm wrong.
https://apps.shopify.com/picamaze Animated watermarks for product images and ads