Install on Static HTML

Add PerchLens to any plain HTML site, including Astro, Eleventy, Hugo, Jekyll, and hand-rolled sites.

Under 2 minutes3 steps
  1. Add the script to your <head>

    For static site generators, add it to your base layout template. For hand-rolled HTML, paste in every page (or use a build-time include).

    <!doctype html>
    <html lang="en">
        <head>
            <meta charset="utf-8" />
            <title>My Site</title>
            <script defer src="https://perchlens.com/cv.js" data-site="{SITE_ID}"></script>
        </head>
        <body>
            <!-- your content -->
        </body>
    </html>
  2. Deploy as usual

    No build configuration changes needed — the script is loaded by the browser, not your build pipeline.

  3. Verify

    Open your site in a private/incognito window (so you don't conflict with any blockers in your normal session). Within seconds the realtime counter ticks up.

Tip: Replace {SITE_ID} in the snippets above with your actual tracking ID. You'll find it in Settings → Tracking after creating a site.

Troubleshooting

Astro: only the first page tracks

Use Astro's ViewTransitions component, OR set is:inline on the script tag so it persists across navigations.

Hugo: script appears in source but no pageviews

Make sure your base template includes the script in <head>, not inside a partial that only some pages use.

Other platforms

No PerchLens account yet?

Create a free account to get your tracking ID — takes about 30 seconds.

Set it up in 30 seconds. Replaced two paid tools.

Indie maker on X

Finally, analytics I actually look at every day.

SaaS founder

My users appreciate no cookie banner. I appreciate the simplicity.

Agency developer

Ready for simpler analytics?

Join thousands of makers who track their sites with clarity, not complexity. Free forever for up to 3 sites.