> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://support.kelp.click/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Kelp on Shopify Hydrogen and React storefronts

On Hydrogen and other React storefronts, Kelp runs server-side in your route loaders.
## Recommended setup
* Run search and browse in server loaders, behind a small interface so the search provider can be swapped cleanly.
* Send analytics through a same-origin proxy on your own domain.
* Cache responses where it makes sense.
* Keep the `queryId` from each search so clicks, add-to-carts and purchases are attributed to it. Purchase events can come from a custom Shopify pixel.
## Using the SDK
The optional `@kelpclick/client` SDK includes React bindings (`KelpProvider`, `useSearch` and `useBrowse`) for React 18 and later. The core search and analytics modules have no React dependency, so they also run in loaders and on the server.
## Guides
* [Shopify Hydrogen / React storefronts](https://docs.kelp.click/platforms/shopify-hydrogen)
* [React Router and Vite](https://docs.kelp.click/platforms/react-router-and-vite)
* [SSR and custom fetch](https://docs.kelp.click/platforms/ssr-and-custom-fetch)