In your root layout.tsx (usually located at src/app/layout.tsx), add the following snippet to the end of your body tag:

<script type="text/javascript" src="<https://api.linkmole.app/backlinker.v1.js>" defer></script>

It should look something like this:

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en">
      <body className={inter.className}>
	      {children}
	      <script type="text/javascript" src="<https://api.linkmole.app/backlinker.v1.js>" defer></script>
      </body>
    </html>
  );
}

Keep in mind, every Next.js project is different, yours might not have the body tag in your rout