Installation

Get PennyLens running on your site in two minutes.

Option 1: Script Tag (recommended for most sites)

Paste this snippet into the <head> of your site. Replace YOUR_SITE_ID with the ID from your project settings.

<script
  src="https://cdn.pennylens.com/tracker.js"
  data-site-id="YOUR_SITE_ID"
  async
></script>

That's it. PennyLens starts tracking pageviews, clicks, scroll, and form interactions automatically.

Option 2: npm (for SPAs and custom setups)

npm install @pennylens/tracker

Initialize the tracker in your app entry point:

import { init } from "@pennylens/tracker";

init({
  siteId: "YOUR_SITE_ID",
  // Optional: tune session recording, privacy, etc.
});

Verify

  1. Open your site in a browser.
  2. Go to the PennyLens dashboard.
  3. Navigate to Overview — you should see a live pageview appear within 10 seconds.

If you don't see events after 30 seconds, check your browser console for errors and confirm the data-site-id matches your project.

Next steps