Shopify Analytics Live View Sessions not working with Hydrogen

Solved
ricomateria
Tourist
3 1 0

Hello,

    I followed the docs for setting up Shopify Page View analytics with Hydrogen about 10 times now. Cart analytics seem to work (when I add something to the cart, I see 1 Active Cart), but live visitor sessions do not show up. I'm also getting 200 responses from the request hitting .well-known/shopify/monorail/unstable/produce_batch.

 

Is there possibly another step I'm missing? I'm deployed to oxygen - I'm not using any third party hosting.

Accepted Solution (1)
ricomateria
Tourist
3 1 0

This is an accepted solution.

Helen found the answer the issue - it was due to me using the STOREFRONT_ID instead of the Shop ID in the root.tsx loader for the analytics: {shopId: shopId} variable.

View solution in original post

Replies 2 (2)
ricomateria
Tourist
3 1 0

Note - the live view analytics work fine on the storefront url (the myshopify.com one). But, I cannot get this working for my production url.

ricomateria
Tourist
3 1 0

This is an accepted solution.

Helen found the answer the issue - it was due to me using the STOREFRONT_ID instead of the Shop ID in the root.tsx loader for the analytics: {shopId: shopId} variable.