Installation

Add JAMP to your website in under two minutes with a single script tag.

Add JAMP to your website by following the framework-specific guide below. Replace YOUR_WEBSITE_ID with the ID from your Settings page.

For Next.js App Router, inject the script into your root layout.

app/layout.tsx
export default function Layout({ children }) {
  return (
    <html>
      <head>
        <script defer
          data-website-id="YOUR_ID"
          src="https://jamp.io/main.js" />
      </head>
      <body>{children}</body>
    </html>
  )
}

If you are using the Next.js App Router, remember that Server Components cannot handle user interactions or access the window object. To track clicks, you must create a dedicated Client Component:

components/TrackButton.tsx
"use client";

export default function TrackButton() {
  const handleClick = () => {
    if (typeof window !== "undefined" && window.jamp) {
      window.jamp.track('signup_click');
    }
  };

  return <button onClick={handleClick}>Sign Up</button>;
}

You can then safely import and use <TrackButton /> inside any of your Server Components.

That's all you need. Pageviews are tracked automatically.

Install with AI

Using an AI assistant like Cursor or Claude? Paste this prompt to wire JAMP in automatically.

Add JAMP analytics and monitoring to this project.

Insert these <script> tags into the <head> of the root layout (layout.tsx for Next.js, or index.html), each with the "defer" attribute. Replace YOUR_WEBSITE_ID with the ID from the JAMP Settings page.

1. Analytics (required):
<script defer data-website-id="YOUR_WEBSITE_ID" src="https://jamp.io/main.js"></script>

2. Real-user Core Web Vitals (optional):
<script defer data-website-id="YOUR_WEBSITE_ID" src="https://jamp.io/app.js"></script>

3. JavaScript error tracking (optional):
<script defer data-website-id="YOUR_WEBSITE_ID" src="https://jamp.io/index.js"></script>

If a version or git SHA is available at build time, add data-release="<version>" to each tag.