▲
INSTALL GUIDE
Next.js
Add the Dupes tracker to your Next.js site. Replace dps_your_site_idand the domain with your own — find them on your site's Install page.
Steps
- 1Open your root layout — app/layout.tsx (App Router) or pages/_document.tsx.
- 2Add the <Script> tag inside <head> as shown.
- 3Deploy. Visits appear in your dashboard within seconds.
import Script from "next/script";
export default function RootLayout({ children }) {
return (
<html lang="en">
<head>
<Script
src="https://dupes-gilt.vercel.app//js/script.js"
data-dupes-id="dps_your_site_id"
data-dupes-domain="yourdomain.com"
strategy="afterInteractive"
/>
</head>
<body>{children}</body>
</html>
);
}💡 Works the same in the Pages Router — put <Script> in _document.tsx.
Install with an AI agent✦ prompt
Copies a ready-made prompt — paste it into Cursor, Claude Code, GitHub Copilot or any AI coding tool and let it do the edit for you.
Track a goal
Record conversions like submit_form anywhere on the page:
<!-- Declarative: fire when clicked -->
<button data-dupes-goal="submit_form">Sign up</button>
<!-- Programmatic: fire from anywhere -->
<script>
window.dupes("submit_form", { plan: "pro" });
</script>