hydrogen: Hydrogen: Cart events not shown on Live View or Analytics dashboard
What is the location of your example repository?
No response
Which package or tool is having this issue?
Hydrogen
What version of that package or tool are you using?
2023.4.0
What version of Remix are you using?
1.16.0
Steps to Reproduce
I have a store built with Remix and Hydrogen. It’s deployed on Vercel.
- The store is a Remix website deployed on Vercel. The setup is almost identical to the Hydrogen demo store except that the store is hosted on Vercel so I’m creating the storefront client a bit differently.
I’m using config data (
PUBLIC_STOREFRONT_API_TOKEN
,PRIVATE_STOREFRONT_API_TOKEN
, andPUBLIC_STOREFRONT_ID
). from the Hydrogen Sales channel for the storefrontClient:
createStorefrontClient({
i18n: {
language: language_code,
country: country_code,
},
publicStorefrontToken: env.PUBLIC_STOREFRONT_API_TOKEN,
privateStorefrontToken: env.PRIVATE_STOREFRONT_API_TOKEN,
storeDomain,
storefrontApiVersion: STOREFRONT_API_VERSION,
storefrontId: env.PUBLIC_STOREFRONT_ID,
}).storefront
-
I’m using a
useAnalytics
hook that is identical to the one in the demo Hydrogen store and it’s using the Hydrogen sales channel. -
The store is deployed on a test vercel domain: https://shopify-template-test.vercel.app/
Expected Behavior
I should be able to see “Active carts” in Live View or cart sessions in the analytics dashboard.
Actual Behavior
No cart events are shown on the Live View or Analytics dashboard.
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 19 (8 by maintainers)
@wizardlyhel I published a version of the demo store that is deployable on Vercel:
@siffogh Is it possible to assign your online store domain and your vercel app under the same top level domain?
Online store: checkout.example.com Vercel app: staging.example.com
Make sure to add the domain prop to the
useShopifyCookies({domain: 'example.com'})
Any updates on this issue? Happy to provide any more context if needed.