Skip to content

Script (CDN)

No npm, no build step, no fuss. Drop a <script> tag into your <head> and you are done.

<script
defer
src="https://forge.codeserk.es/cdn/stats.js"
data-base-url="https://api-events.forge.codeserk.es"
data-sdk="YOUR_SDK_KEY"
></script>

Use defer so the script loads in parallel and never blocks rendering.

Page views are tracked automatically. The script detects the context it is running in and adapts:

  • Astro - listens to astro:page-load to support View Transitions
  • SPA - patches history.pushState and listens to popstate
  • Plain HTML - fires once on load

No extra configuration needed for any of these - it just works.

Looking for framework-specific setup? Check the integrations section: