Tracking/Analytics #92
Replies: 7 comments 7 replies
-
+1 on this topic. While there are always workarounds for instrumenting our analytics outside of the native Shopify Analytics structure (GA/Amplitude/Heap etc.), it would be amazing to have the native analytics working out of the box with the H20 stack. Or even providing some custom hooks and a standard API for clients to use when setting that up in their Hydrogen themes would be super helpful! |
Beta Was this translation helpful? Give feedback.
-
Yeah I'm stuck on the same thing. Not being able to track conversion for a shopify site is really tough. What is the best recommendation here? |
Beta Was this translation helpful? Give feedback.
-
I highly recommend checking out this library: https://getanalytics.io/utils/react-hooks/ It has a great DX, and since it’s platform agnostic, adding a plugin to support Shopify’s native analytics if/when that comes would be fairly trivial. One thing I would love to consider/discuss with Hydrogen is the use of server-side analytics and how we’d go about that. |
Beta Was this translation helpful? Give feedback.
-
@pveen2 Why do you have cross-domain issues when building headless stores with Gatsby/Nextjs? You know you can host your checkout page on the same domain? :) |
Beta Was this translation helpful? Give feedback.
-
Actively working on getting Shopify analytics fully working on Hydrogen and cross checkout.
The only reason why we would need to put checkout on a subdomain is the fact that the hydrogen app is hosted on Oxygen / Netlify / ..etc ... and that checkout is Shopify's online store. I also agree this is not ideal so we're looking at how we can bring checkout onto the same domain. However, this will take some time to explore. |
Beta Was this translation helpful? Give feedback.
-
@wizardlyhel has there been any update on the analytics front regarding Hydrogen? |
Beta Was this translation helpful? Give feedback.
-
I think you all have been waiting for this. Shopify analytics methods that should work on any React framework.
Unfortunately, I am a bit short on time so there are no public documents available yet. I will get to it later. Please look at the nextjs app example that I have in the PR. |
Beta Was this translation helpful? Give feedback.
-
Hi There! Great job was done on Hydrogen! We really like it thus far.
We are working as an agency with headless Shopify projects(gatsby/next) for quite some time now.
One off the biggest challenges is always to get the tracking properly working. Common issues we face are cross-domain issues, as the checkout is always on another domain and making sure that the data structure is the same in the checkout as on the headless website. With Shopify themes, this is never an issue, as most of it comes out of the box. Also, a big advantage of a liquid Shopify theme is that you can use Shopify analytics. With our headless projects the conversion rate, online store sessions are not correct as they only show the traffic of the checkout.
So my question is, what is your best practice regarding tracking and how is it taken into account with Hydrogen/Oxygen? Will it work the same as liquid themes, so tracking out of the box(would be awesome😉)? And how do you see Hydrogen working with Shopify Analytics? I posted this here as I think it is a vital part of e-commerce and would be great if Hydrogen can take this into account as a feature!
Beta Was this translation helpful? Give feedback.
All reactions