Przejdź do treści
NowośćPytania o produkt: klienci pytają na karcie produktu i dostają Twoje odpowiedzi.Zobacz, jak to działa
IdukkiIdukki
Developers + API

Osadzanie w Hydrogen, Next.js, Astro i Remix

Frameworki inne niż Shopify czy WooCommerce: jak poprawnie dodać widżet, żeby nie zepsuć SSR ani hydratacji.

5 min read · last updated 2026-11
On this page

The Idukki widget is a single self-contained <script>. It renders into a placeholder div and never touches your app’s state.

Next.js (App Router)

import Script from "next/script"

export function IdukkiGallery({ bguid, guid }: { bguid: string; guid: string }) {
  return (
    <>
      <div data-ugc="idukki" data-bguid={bguid} data-guid={guid} data-retarget="false" />
      <Script src="https://idukki-cdn.com/version/script_0" strategy="lazyOnload" />
    </>
  )
}

Hydrogen

Użyj podobnego wzorca z komponentem ClientOnly z @shopify/hydrogen. Umieść skrypt w komponencie na końcu drzewa (leaf), aby uniknąć niezgodności SSR.

Galleries after a route change

The loader mounts the galleries on the first page. It then watches for 30 seconds. A gallery that renders later stays empty until you mount it.

  • From a component: call Idukki.mount(el) when the gallery renders, and Idukki.unmount(el) when it leaves.
  • Without code: add data-idk-spa="1" to the loader tag. The widget then mounts galleries after each route change.

Mounted galleries send their GA4, pixel and GTM events as on any store. The full walkthrough is /blog/track-ugc-galleries-headless-hydrogen-nextjs.

Was this page helpful?

Still stuck?

Email us at support@idukki.io or open the in-app chat. We answer within one working day.

Talk to a human

Related guides

Live in minutesDTC + B2B brands79 KB runtimeReal G2 reviews

Stuck?

A real human is faster than a search box.

In-app chat is staffed during EU + US business hours. Status of a ticket? Email support@idukki.io and we’ll surface it.

  • No credit card
  • Cancel anytime
  • GDPR self-certified · SOC 2 (in audit)