What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

How can we fetch the Analytics data via the API?

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 3 (3)

Liam
Community Manager
3108 344 895

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

A-dam
Shopify Partner
9 0 6

As those apis are being deprecated what other ways are there to retrieve reports from shopify?