Storefront Analytics

Solved

Storefront Analytics

Hector-Leon96
Shopify Partner
2 1 0

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.

Accepted Solution (1)

Hector-Leon96
Shopify Partner
2 1 0

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: 

HectorLeon96_0-1710427216948.png

With this change you can continue with the tutorial and the storefront sessions are tracked and send into shopify analytics.

View solution in original post

Replies 2 (2)

Mcastillo
Shopify Partner
8 1 1

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

 

 

Hector-Leon96
Shopify Partner
2 1 0

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: 

HectorLeon96_0-1710427216948.png

With this change you can continue with the tutorial and the storefront sessions are tracked and send into shopify analytics.