Skip to content

Shopify Hydrogen

Aiptimise on a Hydrogen storefront

One npm module, @aiptimise/hydrogen, brings what Aiptimise adds to a Shopify theme store to your own Hydrogen app: AI documents on your domain, AI crawler rules, head links for crawlers, and analytics of shoppers who arrive from AI assistants, carried through to their orders.

Why Hydrogen needs a module#

On a Liquid theme store, Aiptimise works through Shopify: a theme app embed, Shopify's app proxy and the theme's robots.txt. A Hydrogen storefront is your own React Router app on Oxygen, so none of those reach the pages shoppers and crawlers load. The module puts each piece back, in your code, at the same paths a theme store uses.

On a theme storeOn Hydrogen, with the module
App proxy: /apps/aiptimise/*A catch-all route that forwards to Aiptimise: your store's llms.txt, AI sitemap, AI product pages and IndexNow key file on your domain, with AI crawler analytics.
/llms.txt at the rootA route that serves the same llms.txt.
robots.txt customization in the themeA helper that appends Aiptimise’s AI crawler rules and sitemap line to your own robots.txt.
Theme embed head links (rel="alternate")A loader call and a meta wrapper that add the same links to your home and product pages.
Theme embed Product JSON-LDOptional, off until you agree: Aiptimise's Product JSON-LD in place of yours, read from a product metafield with your own product query. Your offers (price, currency, availability) are kept exactly as you print them.
Theme tracker for AI visits<AiptimiseAnalytics> inside your Hydrogen <Analytics.Provider>.
Web pixel at checkoutA call in your cart route that puts the AI visit on the cart, which Shopify copies onto the order.

All content is built by Aiptimise. The module forwards each request, signed with your storefront's secret, and returns the answer. It never adds anything shoppers see. Your titles and tags are left as they are, and so is your Product JSON-LD unless you agree to switch on the optional product block.

What works without it#

Everything Aiptimise does through the Shopify Admin API is the same for a Hydrogen store: catalog sync, enrichment, publication to your product metafields, the Commerce MCP, and channel feeds such as Google Merchant Center. Checkout still runs on Shopify.

AI order attribution also reads the customer journey Shopify records on each order, but a Hydrogen storefront that sends Shopify no analytics often leaves it empty, and checkout runs on Shopify's domain, where your storefront's cookies cannot be read. The cart step of the install guide closes that gap.

Before you start#

  • Your store is connected to Aiptimise through its Shopify app, and Aiptimise has your storefront's public URL (a Hydrogen store's Shopify primary domain is often the checkout host, so we set it by hand).
  • Aiptimise gives you two values for your storefront: a site id and a site secret. The secret is shown once; keep it in Oxygen's secret environment variables only.
  • A Hydrogen app on React Router (Hydrogen 2024.4 or later), deployed to Oxygen, and someone who can add routes and deploy it. Allow half a day, including a preview deploy.

Start with us

@aiptimise/hydrogen is on npm, but it answers only once your storefront is set up in Aiptimise. Write to support@aiptimise.com and we send you its site id and secret.