Hydrogen Redirect Theme - Google Analytics/Facebook scripts not injected

Topic summary

A user encountered an issue where Google Analytics and Meta Pixel scripts failed to load at checkout when using Shopify’s Hydrogen Redirect Theme for a headless storefront. The scripts worked correctly when switching to the Dawn theme (100% Liquid).

Key Details:

  • The domain changes from the primary domain to the myshopify.com checkout domain during checkout
  • The user suspected potential issues with cookie passing or automatic cookie consent blocking

Resolution:

  • Another user identified the root cause: the native online store cookie consent banner was likely enabled
  • Solution: Disable the cookie consent banner in Shopify admin settings (Settings > Privacy > Consent Banner), as it only affects the Online Store portion and won’t work on Hydrogen
  • For Hydrogen storefronts, the consent banner must be implemented manually

The issue was successfully resolved after applying this fix.

Summarized with AI on November 10. AI used: claude-sonnet-4-5-20250929.

Hello,

I have a site using the headless storefront (Hydrogen) and the Hydrogen Redirect Theme. The redirect theme is set up to point to the primary domain and works well in this regard.

However when going to checkout, the Google Analytics and Meta Pixel scripts do not load at all. If I switch briefly to the Dawn theme which is 100% Liquid, the scripts are loaded and run correctly.

When leaving the front end to go the checkout, the domain changes from the primary domain to the myshopify checkout domain.

Has anyone encountered this issue with the redirect theme?

I wonder if there is an issue with passing cookies or perhaps some kind of automatic block for cookie consent.

Thanks in advance.

Hi @pdring , I think you can check whether you enabled the cookie banner for the native online store here: https://www.shopify.com/admin/settings/privacy/consent-banner. It should be turned off so it won’t take effect on the Online store part, including the checkout page.

Since your store now running on Hydrogen, you should implement the consent banner manually.

Hope this helps!

It seem to work fine! Thank you so much!