Add the badge to Next.js
Next.js is the one place where the copy-paste answer silently fails. React strips raw <script> elements out of JSX. It does not warn, it does not error, it just never renders them, so the line that works in every other stack does nothing here. next/script is the fix, and it is a two-line change.
Where the code goes
Put it in the root layout, once. app/layout.tsx for the App Router, or pages/_app.tsx for the Pages Router. The badge is a page-level widget that mounts itself onto <body>, so a per-route copy just gives you two of them on client navigation.
Use strategy="afterInteractive". It is the default, and it is the right one: the badge renders after hydration, so it can never block your first paint or move your LCP. lazyOnload also works and delays it further; beforeInteractive is wrong here and Next will warn you.
Swap in your handle. data-taksh is the whole configuration. Copy the handle from your dashboard rather than typing it, a wrong handle serves nothing and fails silently, which looks identical to a broken install.
The code
import Script from "next/script";
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>
{children}
<Script
src="https://maketaksh.com/badge.js"
data-taksh="yourname"
strategy="afterInteractive"
/>
</body>
</html>
);
}Swap yourname for your handle. It is the one in your dashboard.
If you pasted a raw <script> tag and nothing happened
That is the expected outcome, not a bug in the badge. JSX is not HTML: React drops <script> elements on the floor during render. Nothing appears in the DOM, nothing appears in the Network tab, and there is no console error to find. Switch to next/script and it works on the next reload.
Checking it worked
Load the published page and look at the bottom corner. If nothing is there, it is almost always one of four things, in order of how often: the handle has no projects in it yet; the handle is wrong; the platform stripped the tag, as described above; or a content blocker ate it, check the Network tab for badge.js.
Once it is live, the Analytics panel in your dashboard lists every site the badge has been seen on, from the first page load, which is the fastest way to confirm an install on a site you cannot easily open.
Other setups
React · Astro · All twelve setups
What the badge is, and why cross-linking your own launches is worth doing at all: the short version.