Join us for an upcoming Shopify Partner webinar on February 27, 2024. Discover the latest Checkout Extensibility features, and deep dive on improvements to Shopify Functions and Web Pixels. Register now for either the 10am EST or 2pm EST sessions.

How can we fetch the Analytics data via the API?

SnirYadid
Visitor
2 0 0

We want to obtain the Analytics report data via the API.

We currently using the REST and GraphQL APIs but we don't found those fields.

List of fields:

1. Online Store Conversion Over time

2. Added to Cart

3. Conversion Rate

4.  Sessions

5. Total Visitor Count

 

Replies 2 (2)

Liam
Shopify Staff
2630 284 720

Hi SnirYadid,

 

There's no direct APIs endpoints that will return the analytics data that can be generated from the admin reports, but you could use ShopifyQL and the Admin API to piece together the data you're looking for. For example you could use the Orders dataset, which is a part of ShopifyQL to explore data about order value and volume, and create custom reports with the Reports resource in Rest

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

SnirYadid
Visitor
2 0 0

If I understand correctly, in order to fetch the fields I mentioned above, we should first create a custom report in the UI and then pull it via the Reports endpoint?

https://shopify.dev/docs/api/admin-rest/2023-10/resources/report#post-reports