본문 바로가기
새 기능상품 Q&A: 고객이 상품 페이지에서 묻고 내가 작성한 답을 받습니다.작동 방식 보기
IdukkiIdukki
Developers + API

Hydrogen, Next.js, Astro, Remix에 삽입하기

Shopify나 Woo가 아닌 프레임워크에서 SSR이나 하이드레이션을 깨뜨리지 않고 위젯을 넣는 올바른 방법입니다.

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

@shopify/hydrogen의 ClientOnly로 비슷한 방식을 사용하세요. SSR 불일치를 피하려면 스크립트를 말단(leaf) 컴포넌트에 두세요.

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)