Flowtag LogoFlowtag

Next.js Integration

Integrate Flowtag with your Next.js application.

1. Install @flowtag/next

pnpm add @flowtag/next
npm install @flowtag/next
yarn add @flowtag/next
bun add @flowtag/next

2. Add <Flowtag /> to layout.tsx

import { Flowtag } from "@flowtag/next";

export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <html lang="en">
      <body>
        {children}
        <Flowtag trackerId="your-tracker-id" silent={true} syncWithGoogleTag={true} beaconStrategy="after_consent" />
      </body>
    </html>
  );
}