GA4’s own tag handles page views in the browser. The ecommerce events — view_item, view_item_list, view_cart, search, add_to_cart and remove_from_cart — are sent from PixelRelay’s servers through GA4’s Measurement Protocol, and the purchase is sent from the Shopify order. You connect GA4 with a Measurement ID and an API secret; there is no GTM container to build.
| GA4 event | Sent by | |
|---|---|---|
| Page view | page_view | GA4 tag; server copy only if the tag was blocked and Track page views server-side is on |
| Product view | view_item | Server |
| Collection view | view_item_list | Server |
| Cart view | view_cart | Server |
| Search | search | Server |
| Add to cart, remove from cart | add_to_cart, remove_from_cart | Server |
| Purchase | purchase | Server, from Shopify’s order webhook |
Usually because the purchase was expected from a browser tag. Checkout runs on Shopify, outside your Hydrogen app, so a gtag in your storefront never sees the order. Sending the purchase from the Shopify order removes that dependency. If GA4 also receives purchases from another source, such as a GTM container or another app, the same order is counted twice — switch the old source off.
Open Reports → Realtime in GA4 and click around your storefront; events usually appear within a few minutes. In the console, window.google_tag_manager should be defined on a page where GA4 is connected — if it’s undefined while /api/relay requests succeed, your Content-Security-Policy is blocking the tag. The PixelRelay event log shows what was sent to GA4 and any errors.
G-) and a Measurement Protocol API secret from the same stream. Connect GA4 shows where to find both.useTrackEvent() go to GA4 with their name and event ID. Custom properties aren’t forwarded to GA4.Each guide covers one platform or layer of a Hydrogen setup. The Hydrogen quickstart has the full install, step by step.