Skip to main content
Follow these 4 simple steps to start tracking your website visitors and revenue.

Step 1: Create an account

Sign up for a PostMetric account at [your-dashboard-url]. You’ll get access to your dashboard where you can manage all your websites.

Step 2: Add your website

  1. Click “Add Website” in your dashboard
  2. Enter your website name and domain
  3. Click “Create”
Your website will be created with a unique tracking code.

Step 3: Install the tracking script

Copy the tracking script from your dashboard and add it to your website. The script will be generated automatically for your website.

Basic installation

Add this script to the <head> section of your website:
<script src="https://your-domain.com/api/track.js?site=YOUR_TRACKING_CODE"></script>
Replace YOUR_TRACKING_CODE with the tracking code from your dashboard.

Next.js installation

For Next.js projects, add the script to your app/layout.tsx or pages/_app.tsx:
import Script from "next/script";

export default function RootLayout({ children }) {
  return (
    <html>
      <head>
        <Script
          src="https://your-domain.com/api/track.js?site=YOUR_TRACKING_CODE"
          strategy="afterInteractive"
        />
      </head>
      <body>{children}</body>
    </html>
  );
}
The tracking script automatically tracks page views and supports single-page applications (SPA) out of the box.

Step 4: Verify tracking

  1. Visit your website
  2. Go back to your PostMetric dashboard
  3. You should see your visit appear in real-time
It may take a few seconds for visits to appear in your dashboard. If you don’t see your visit, check that the tracking script is correctly installed.

Next steps

Now that you’re tracking visitors, explore these features: