Skip to content

Framework recipes

Every recipe below is the same Quickstart snippet — the only thing that changes is where you inject it so it lands at the top of <head>, before any tracker.

Detailed, copy-paste recipes for each platform are being migrated from docs/INSTALL.md § “Platform & framework recipes”:

  • Plain HTML — paste at the top of <head>.
  • WordPress — mu-plugin, a header plugin, or child-theme functions.php.
  • Drupalhtml.html.twig or a module hook_page_attachments.
  • React (Vite/CRA) — inject in index.html; a useConsent hook for app code.
  • Next.js — App Router (dangerouslySetInnerHTML in the layout head + next/script) and Pages Router (_document.tsx + _app.tsx).
  • Vue 3 / Nuxt 3index.html or app.head in nuxt.config.ts.
  • Shopifytheme.liquid, before content_for_header.
  • Webflow / Squarespace / Wix — custom-code / header-injection fields.