App reviews, troubleshooting, and recommendations
Hi,
I've been looking into the ShopifyQL API c.f. https://shopify.dev/docs/api/shopifyql in relation to getting the number of sessions or the number of visitors for a given time period.
As far as I can see, you can only query data about orders, products or payments in the ShopifyQL API. For products you can query different metrics about sessions e.g. view_sessions and cart_sessions, but always in relation to the product as opposed to sessions or visitors in general.
From previous posts it looks like there might have been a session metric in the ShopifyQL API earlier on, but not anymore. Or maybe I can find the information in another API entirely?
Kind regards,
-Louise
The ShopifyQL API does not include user sessions. However, you can definitely use other language to detect users and log sessions
What would be a good workaround?
When talking about "sessions" usually what people here are referring to is even aggregated data about how many times a product page has been viewed.Is that possible?
What about creating a developer app for shopify plus merchants that will call shopifyql API?
There is documentation saying that there might be a way, for example:
https://shopify.dev/docs/api/shopifyql/datasets/products-dataset
Hi InnaB,
Thank you for your reply.
Yes I did see the products dataset in ShopifyQL, but it only refers to sessions for a specific product, but I am interested in sessions overall, i.e. not only related to a specific product.
Update: I would prefer getting the exact same number of visits/sessions as from the Shopify Analytics report.
So even though I could calculate a number via other non-Shopify APIs og maybe with the Shopify web pixel API, I would prefer to use exactly the same data as what is accessible in the Shopify analytics reports
From what I understood from Shopify, you can't access session data through an API like you can through the interface.Ive been researching this subject for a while.
I am interested to know if you did manage to pull product data set sessions with ShopifyQL.
Ah ok.
I did not try because it is not the data I am looking for.
But I guess something like below would do the trick:
query {
shopifyqlQuery(query: "FROM products
SHOW
sum(gross_sales),
sum(view_sessions)
SINCE -7d") {
__typename
... on TableResponse {
tableData {
unformattedData
rowData
columns {
name
dataType
displayName
}
}
}
parseErrors {
code
message
range {
start {
line
character
}
end {
line
character
}
}
}
}
}
Shopify uses Google analytics data. Might as well use the Google api if that is what your looking for
Thank you for your reply.
Ok that is interesting - where did you find information about that?
Information is the same as the Google analytics info
Hi,
I was looking to create a similar report in Power BI for the sessions over time.
I was hoping you could share what you have learn in you have create a report pulling the data from Google Analytics GA. To be more specific, if you use an api or sync the data from GA, which table did you find the data in, any other helpful information to jump start my task would be greatly appreciated.
M.
Mike
Hey,
I have been playing around with data between GA4 and Shopify for a while, I dont think shopify uses GA data as per say but you can get pretty close when using GA4 data, the only thing you need to do it install server side tracking on your website to GA4 before you start comparing, because if not you wont get great matches, I am getting around a 95-97 percent match between purchases and session data from GA4 vs Shopify
This is the tool I use for server side tracking : https://www.getelevar.com/
We recently spoke with Zopi developers @Zopi about how dropshipping businesses can enha...
By JasonH Oct 23, 2024A big shout out to all of the merchants who participated in our AMA with 2H Media: Holi...
By Jacqui Oct 21, 2024We want to take a moment to celebrate the incredible ways you all engage with the Shopi...
By JasonH Oct 15, 2024