New Shopify Certification now available: Liquid Storefronts for Theme Developers

ShopifyQL returns different data than what is seen on the analytics dashboard.

Skrypt
Shopify Partner
6 0 1

Hi,

 

When I query data from shopifyQL using the graphql admin api, I get different data that what is seen on the dashboard.  

 

For example if I want to retrieve visits for 2022, I get :

Screenshot 2023-01-07 at 15.11.24.png on shopify dashboard, but shopifyQL gives me 5 100 visits.

 

To get the visits with shopify ql I used

FROM products SHOW SUM(view_sessions) SINCE ${formatDate(dateRange.start)} UNTIL ${formatDate(dateRange.end)}

 

Reply 1 (1)
ShopifyDevSup
Shopify Staff
Shopify Staff
1203 190 420

Hi @Skrypt - the ShopifyQL query you shared would only provide view sessions for product pages specifically - I am not aware of a way to pull view sessions per product page via the dashboard analytics (rather, it just pulls total view sessions for the shop as a whole), this could potentially explain the discrepancy. That said, since I am unable to confirm the specifics of this store, if you feel there is a discrepancy with data seen in the Admin compared to the API, please feel free to connect with Shopify Support and reference my post here to report this as unexpected behaviour.

 

Hope this helps - thanks for getting in touch!

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us 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