Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Hello, I have a problem with shopify analytics since I deploy the storefront in oxygen.
Normally the users sessions are around 3k with online store, with storefront are around 150 per day.
I complete the Analytics with Hydrogen and Oxygen tutorial and got the same results.
I validate analytics are working with monorail-edge.shopifysvc.com filter in network from browser dev tools.
The shopify admin analytics track only sessions from checkout.
¿Is anyone with knowledge about analytics with storefront?
in particular this issue from track online store sessions.
Thank you for the support.
Solved! Go to the solution
This is an accepted solution.
I'll found the solution. Just go ahead with the tutorial Track Hydrogen page views with Shopify analytics and in the root-route part, the tutorial tells to add a shopId, this is very confused, with the first implementation I add the public_storefront_id that you found in hydrogen app inside into your storefront settings. The solution is add instead an ID from graphql shop query, like this:
{
shop {
id
}
}
Make sure API schema is storefront:
With this change you can continue with the tutorial and the storefront sessions are tracked and send into shopify analytics.
Hi Hector,
So your trouble is that you cant track visitors into your custom storefront (Hydrogen)?
i got the same problem, although i receive the specified 200 response code from Shopify, the admin panel just doesnt show up any of those visitors
This is an accepted solution.
I'll found the solution. Just go ahead with the tutorial Track Hydrogen page views with Shopify analytics and in the root-route part, the tutorial tells to add a shopId, this is very confused, with the first implementation I add the public_storefront_id that you found in hydrogen app inside into your storefront settings. The solution is add instead an ID from graphql shop query, like this:
{
shop {
id
}
}
Make sure API schema is storefront:
With this change you can continue with the tutorial and the storefront sessions are tracked and send into shopify analytics.