Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.seerstack.com/llms.txt

Use this file to discover all available pages before exploring further.

SeerStack provides a lightweight browser snippet that automatically tracks pageviews, clicks, and rageclicks. Use this for product analytics and UX insights without instrumenting every button.

Install the snippet

Add the script tag to your site and include your Publishable Key.
<script
  src="https://app.seerstack.com/web-analytics.js"
  data-key="pk_live_..."
></script>
If you want to use a custom API host (self-hosted or staging), add data-host:
<script
  src="https://app.seerstack.com/web-analytics.js"
  data-key="pk_live_..."
  data-host="https://api.seerstack.com"
></script>

Auto-tracked events

EventWhen it firesDescription
$pageviewOn page load (and when you manually call pageview)Captures page navigation context.
$clickOn button and link clicksCaptures element metadata for UX analysis.
$rageclick3+ rapid clicks on the same button or linkSignals user frustration or broken UI.

Auto-captured properties

These properties are attached to every event:
PropertyDescription
$urlFull page URL
$pathURL path
$referrerReferrer URL
$titlePage title
$screen_widthScreen width
$screen_heightScreen height
$viewport_widthBrowser viewport width
$viewport_heightBrowser viewport height
$languageBrowser language
$user_agentBrowser user agent
$platformBrowser platform
$device_typeDevice category (mobile, tablet, desktop)
$osOperating system (ios, android, windows, macos, linux)
$device_vendorDevice vendor (best-effort)
$countryCountry (server-enriched)
$regionRegion (server-enriched)
$cityCity (server-enriched)
Click events also include:
PropertyDescription
$element_tagElement tag name
$element_idElement id
$element_classesElement class list
$element_textElement text (trimmed)
$element_hrefLink href (if any)
$element_typeInput type (if any)
$element_nameInput name (if any)
$element_roleARIA role (if any)

Next.js (App Router)

Add the script once in your root layout:
import Script from "next/script";

export default function RootLayout({ children }) {
  return (
    <html>
      <body>
        <Script
          src="https://app.seerstack.com/web-analytics.js"
          data-key={process.env.NEXT_PUBLIC_SEERSTACK_KEY}
          strategy="afterInteractive"
        />
        {children}
      </body>
    </html>
  );
}
The snippet automatically tracks client-side route changes for SPA frameworks like Next.js.

Manual tracking

You can also send your own events from the browser:
<script>
  window.seerstack.capture("signup.completed", { plan: "pro" }, "user_123");
</script>

Reserved event names

Event names starting with $ are reserved for SeerStack system events. Avoid using $ prefixes for custom events.