Analytics is now stable #2204
Replies: 8 comments 20 replies
-
Do we need to make any changes to unstable code we implemented before? Is there any breaking changes? @scottdixon |
Beta Was this translation helpful? Give feedback.
-
What is your recommendation to track a customer from Hydrogen app through the whole Checkout until the the Thank you page in a seamless way? It is easy on Shopify vanilla with webpixel, but there is no documentation for headless about that for Hydrogen. |
Beta Was this translation helpful? Give feedback.
-
@wizardlyhel I'm following up on our chain of comments above with a few observations now that I've had a chance to implement the the Customer Privacy API and Shopify’s built-in cookie consent banner. Can you help me clarify whether my experience has been expected, or whether there are issues to be addressed? For context, I'm working on a non-Hydrogen headless site using Next.js. Here's what I'm doing:
Here's the actual implementation to show that I've followed everything as instructed:
I am able to load the cookie banner, and when using the banner, I can see that a GraphQL call goes out to the Customer Privacy API with my preferences, and my However, I noticed the following two potential issues:
|
Beta Was this translation helpful? Give feedback.
-
What you are observing sounds correct. The override of When using Shopify's privacy banner, you will get a
When consent is loaded, This should reflect whatever the setting the Shopify privacy banner defaulted to or if you ever run This cookie value should stay the same when navigated to checkout. If it is not matching or consent setting is being reverted back to default, check the cookie domain. (I got a PR coming to auto detect cookie domain (that sets the |
Beta Was this translation helpful? Give feedback.
-
@wizardlyhel How do we set the language of the consent banner? Right now its always in english, and my shop if in 3 language :) Can we manually set the language somewhere? |
Beta Was this translation helpful? Give feedback.
-
Edit: ignore everything else. I'm simply wondering at this point where in shopify analytics I should be seeing search_submitted and others (see reply below) Should using I followed the guide and my consent and shop values are true. I also did see the default Hydrogen consent box and agreed to it. I also confirmed the component is getting the desired data props Finally, where would I see these in shopify analytics? I'm guessing Edit: after upgrading to |
Beta Was this translation helpful? Give feedback.
-
Currently this hydrogenSubchannelId to "0" , shouldn't this be updated to hydrogenSubchannelId: payload.hydrogenSubchannelId || '0' since that is what will be set when the Analytics Provided is initialised?
|
Beta Was this translation helpful? Give feedback.
-
Apparently I'm missing some relevant headers in my use of <Analytics.SearchView
data={{searchTerm: q, searchResults: page.results}}
/> I'm curious. Do I need to be invoking this hook? I am using the provider <Analytics.Provider
cart={data.cart}
shop={data.shop}
consent={data.consent}
cookieDomain="mydomain.com"
> |
Beta Was this translation helpful? Give feedback.
-
Implementing analytics with Hydrogen is simpler, more reliable, and more extensible.
Rolled out as unstable in our April release, the new analytics DX is now stable. The new Analytics components are now included by default in new Hydrogen projects, and works out of the box with the Customer Privacy API and Shopify’s built-in cookie consent banner.
Beta Was this translation helpful? Give feedback.
All reactions