Skip to content

Next.js

Terminal window
npm install @junctionjs/next @junctionjs/client @junctionjs/core
import { createClient } from "@junctionjs/client";
import { ga4 } from "@junctionjs/destination-ga4";
const jct = createClient({
destinations: [
{
destination: ga4,
config: { measurementId: "G-XXXXXXXXXX" },
consent: ["analytics"],
},
],
});

See the demo app for a full Next.js reference implementation.

Full documentation coming soon.