Next.js Integration
Integrate Flowtag with your Next.js application.
1. Install @flowtag/next
pnpm add @flowtag/nextnpm install @flowtag/nextyarn add @flowtag/nextbun add @flowtag/next2. 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>
);
}