Migrating from a Liquid theme to Hydrogen mid-integration, do our slots and experiments survive?
We are mid-replatform from a Dawn-based theme to Hydrogen, targeting a cutover in March, which in replatform time means May.
Croct is live on the Liquid side today via the GTM tag, with about a dozen experiences and a couple of running experiments built over the last year.
Before I promise anything to the marketing team: when the storefront switches to Hydrogen, what actually carries over and what do we rebuild? I would rather find out here than in April.
1 answer
Everything the marketing team built carries over; what changes is the delivery layer.
Slots, components, audiences, and experiences live in the dashboard and are frontend-agnostic. Your dozen experiences do not know or care whether the storefront rendering them is Liquid or Hydrogen, so nothing there is rebuilt.
What changes is how content is delivered. The Liquid side uses the JS SDK plus the GTM tag; on Hydrogen you switch to the Hydrogen SDK, which resolves content in your route loaders so pages arrive personalized server-side. Practically, that means re-integrating each slot in the new codebase: same slot IDs, new fetch location.
Setup on the Hydrogen side is quick: npx croct@latest init detects the Hydrogen setup and wires the provider and request context for you.
If anyone on the team needs a refresher on how the current Liquid setup is wired before you unwind it, this thread covers it: Setting up Croct on a Liquid theme.