Forge Stats
Forge Stats is the analytics module of Forge. It tracks page views and sends them to the Forge API - that’s it. No fingerprinting, no third-party scripts phoning home, no cookie banners required.
It works in any context:
- Drop a
<script>tag and forget about it - Use the TypeScript SDK if you need more control
- Works with plain HTML, SPAs, Astro, Node.js, and React Native
Pick your approach
Section titled “Pick your approach”Script (CDN) - one tag in your <head>, done. No build step, no npm. Best for most cases.
TypeScript SDK - install the package and call track(). Use this when you need custom event data, error handling, or are working in Node.js or React Native.
Integrations
Section titled “Integrations”Astro - full View Transitions support out of the box.