'use client' import Link from 'next/link' import { ArrowLeftIcon } from '@ciphera-net/ui' export default function NextJsIntegrationPage() { return (
The best way to add Pulse to your Next.js application is using the built-in next/script component.
Add the script to your root layout file (usually app/layout.tsx or app/layout.js).
{`import Script from 'next/script'
export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
{children}
)
}`}
If you are using the older Pages Router, add the script to your custom _app.tsx or _document.tsx.
{`import Script from 'next/script'
import type { AppProps } from 'next/app'
export default function App({ Component, pageProps }: AppProps) {
return (
<>
>
)
}`}
example.com).
https://pulse.ciphera.net/script.js
afterInteractive to ensure it loads quickly without blocking hydration.