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.
Recipes being migrated
Section titled “Recipes being migrated”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. - Drupal —
html.html.twigor a modulehook_page_attachments. - React (Vite/CRA) — inject in
index.html; auseConsenthook for app code. - Next.js — App Router (
dangerouslySetInnerHTMLin the layout head +next/script) and Pages Router (_document.tsx+_app.tsx). - Vue 3 / Nuxt 3 —
index.htmlorapp.headinnuxt.config.ts. - Shopify —
theme.liquid, beforecontent_for_header. - Webflow / Squarespace / Wix — custom-code / header-injection fields.