Skip to content
Back to search

supersaas-analytics-core

Web analytics for you and your AI agents. Connect Claude Code, Cursor or Codex over MCP and ask about traffic, Funnels and revenue in plain English or open the dashboard and see it all yourself. No cookies, no consent banner

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/hafizjavaid--supersaas-analytics-core/badge.svg)](/listings/hafizjavaid--supersaas-analytics-core)

HTML

<a href="/listings/hafizjavaid--supersaas-analytics-core"><img src="/api/listings/hafizjavaid--supersaas-analytics-core/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

pnpm install
pnpm dev            # http://localhost:3001
pnpm db:seed        # fill a Site with demo traffic

| Command | What it does | | --- | --- | | `pnpm dev` | dev server on port 3001, SQLite in `.data/db` | | `pnpm test` | Vitest: unit and server projects | | `pnpm lint` / `pnpm typecheck` | ESLint (demo-next style) / vue-tsc | | `pnpm db:generate` | generate a migration from `server/db/schema` | | `pnpm db:seed [siteId] [days]` | replace a Site's analytics with demo data (dev only) | | `pnpm rollup [YYYY-MM-DD]` | run the daily Rollup on the dev server | | `pnpm run deploy` | build for Cloudflare, migrate the remote D1, deploy |

Environment variables are listed in `.env.example`. None are needed locally.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 114 lines
  1. # Supersaas Analytics
  2. Cookieless web analytics for Organizations and any number of their own websites. Built with Nuxt 4, Nuxt UI, NuxtHub
  3. and Better Auth, and deployed to Cloudflare Workers with D1.
  4. It replaces `analytics-main` (TanStack Start), with the same behaviour as seen by a Site's Visitors and by the owner.
  5. ## What it does
  6. - **Tracking snippet** at `/sd.js`, minified at build time from `tracking-snippet/sd.js` and kept under 1,024 B
  7. gzipped. A Site embeds `<script defer data-site="<site id>" src="https://<host>/sd.js"></script>`. It reports
  8. Pageviews, SPA route changes and Outbound link clicks, sends Events through `sd(name, props)` and an identity through
  9. `sd.identify(id)`, and captures `tel:`, `mailto:` and WhatsApp link clicks, form submits and clicks on
  10. `[data-sd-event]` elements as Events with the page path, and `sd.visitorId()` returns the Visitor id from the last `/collect` response. It sets no cookies
  11. and uses no storage.
  12. - **Ingestion** at `POST /collect`. It always answers `204` at once and writes in the background:
  13. - A Visitor is `sha256(salt:site_id:ip:ua)`, where the salt is random per UTC day and deleted once the day ends, so
  14. the same person is a new Visitor each day.
  15. - `sd.identify(id)` stores `hmac(site secret, id)` on the Visitor, never the id itself. Visitors identified with the
  16. same id share that hash, which links their days.
  17. - A Visit is a 30-minute window measured from its start.
  18. - Hits from bot User-Agents, from a Site's ignored IPs or CIDRs (Settings → Filtering), and Pageviews or Events on
  19. its excluded path globs are dropped before anything is stored.
  20. - Geo comes from Cloudflare, or from forwarded `x-vercel-ip-*` headers when a Site proxies `/collect` through its
  21. own domain, which also passes the visitor's IP first in `X-Forwarded-For`.
  22. - **All sites** at `/app/<organization>`, behind sign-in: Visitors, Pageviews (last 24 hours, with their absolute
  23. change against the 24 hours before) and Live visitors across every Site, then one band per Site with its online
  24. count, the same figures and an hourly sparkline, all from one request.
  25. - **Live** at `/app/<organization>/live` (every Site, each Visitor with a Site badge) and
  26. `/app/<organization>/sites/<site>/live`: "N live", Pageviews per minute over the last 30 minutes with the peak,
  27. referrer, country and device chips, and the current Visitors (page, city, browser, device, Source) beside the globe.
  28. Hovering a Visitor highlights its point and turns the globe to it. Polled every 15 seconds.
  29. - **Dashboard** at `/app/<organization>/sites/<site>`:
  30. - a Range picker (today, yesterday, last 24 hours, 7, 30 and 90 days, 6 and 12 months, custom) and
  31. a Live visitor badge
  32. - a KPI strip (Visitors, Pageviews, Bounce rate, Visit duration, and Conversion rate once the Site has a Goal), each
  33. with its change against the previous period, that toggles the chart's series
  34. - ranked Pages (with Outbound links), Sources, Devices and Locations (with a live globe). Sources group into
  35. Channels (Direct, Search, Social, AI assistant, Email, Paid, Referral) from the referrer and UTM, with tabs for
  36. referrers, AI assistants and the UTM campaign, medium, term and content
  37. - a Realtime card (Visitors online, the last 30 minutes of Pageviews and the current Visitors) with "View realtime →"
  38. - Events, one row per Event and the page it fired on. Clicking one opens a panel that breaks it down by property key
  39. and value, for that page or all pages, read from raw rows.
  40. - Goals (Site Settings → Attribution): Quick add chips for the auto-captured WhatsApp, Phone, Email, Form submit and
  41. Outbound clicks, or a custom Goal on an Event name or a page pattern (`/blog/*`). The Goals card lists each Goal's
  42. unique Visitors, total conversions and conversion rate, read from raw rows; clicking one narrows the dashboard to
  43. the Visits that converted (`?f=goal:event:signup`).
  44. - **Funnels** per Site: 2 to 8 Pageview-pattern or Event steps completed in order within 1 hour, 24 hours, 7 or 30
  45. days (other pages in between are fine; Identified visitors count across days). Each card shows Entered, Completed
  46. and Conversion rate, each step's count and share of entries, and "↓ X% continue · N dropped" between steps. A
  47. builder slide-over previews the draft over the current Range; the dashboard shows a Funnel with "All funnels →".
  48. - a **Journeys** explorer per Site: columns "Starting point → 1 step after → 2 steps after …" of the pages Visitors
  49. open, with each node's Visitors and share, starting points grouped by their first path segment, a "No further
  50. action" row for the Visitors who left, and "Events on <page>" for the selected node. It reads raw rows, follows the
  51. Range and Filters, and each Funnel card links to it with "Explore journeys →".
  52. - a **Pages** tab per Site: Pages, Pageviews, Visits, Avg. bounce and Avg. duration, then a searchable table sorted by
  53. any column with each page's title and path (or full URL), a trend sparkline, views, Visits with their change, bounce
  54. rate and time on page. It follows the Range and Filters.
  55. - a **Users** tab per Site: Visitors, Pageviews, Views per Visitor and Avg. time, then the Visitors of the Range
  56. ("Visitor 083047", country, Source, device, Visits, Pageviews, time, entry → exit), searchable by visitor id,
  57. country or page. Clicking one opens its journey: totals, the first Source, Visit chips and a timeline of
  58. Pageviews (time on page, entry marked), Outbound links and Events with their properties. An Identified visitor's
  59. journey covers every day with the same identify hash.
  60. - Filters: clicking a ranked row narrows the whole dashboard to the Visits that match it. Filters stack, live in the
  61. URL (`?f=country:PK&f=browser:Safari`) and show as removable chips. Filtered views read raw rows.
  62. - **Daily Rollup** at 00:10 UTC for each Site's previous local day. Key figures read past days only from Rollups, and today
  63. and "Last 24 hours" from raw rows. Single-day and 24-hour charts are hourly, from raw rows.
  64. - **Accounts and Organizations** with Better Auth: email and password (verified), magic links, Google and GitHub.
  65. Members have one role, Owner, Admin or Viewer, and each Organization has exactly one Owner. Email goes through Resend
  66. and is printed to the console in dev.
  67. ## Quick start
  68. ```sh
  69. pnpm install
  70. pnpm dev # http://localhost:3001
  71. pnpm db:seed # fill a Site with demo traffic
  72. ```
  73. | Command | What it does |
  74. | --- | --- |
  75. | `pnpm dev` | dev server on port 3001, SQLite in `.data/db` |
  76. | `pnpm test` | Vitest: unit and server projects |
  77. | `pnpm lint` / `pnpm typecheck` | ESLint (demo-next style) / vue-tsc |
  78. | `pnpm db:generate` | generate a migration from `server/db/schema` |
  79. | `pnpm db:seed [siteId] [days]` | replace a Site's analytics with demo data (dev only) |
  80. | `pnpm rollup [YYYY-MM-DD]` | run the daily Rollup on the dev server |
  81. | `pnpm run deploy` | build for Cloudflare, migrate the remote D1, deploy |
  82. Environment variables are listed in `.env.example`. None are needed locally.
  83. ## Guides
  84. - [Self-hosting on Cloudflare](docs/self-hosting.md): run it on your machine, then deploy your own copy and keep it
  85. updated.
  86. - [Installation](docs/installation.md): add the tracking snippet to a website.
  87. - [Proxying through your domain](docs/proxying.md): serve the snippet from your website's own domain.
  88. The full documentation is at [supersaasanalytics.com/docs](https://supersaasanalytics.com/docs).
  89. ## Contributing
  90. Pull requests are welcome. Run `pnpm lint`, `pnpm typecheck` and `pnpm test` first. This repository is published from
  91. our main repository, so a merged change arrives in the next release rather than as a merge here; you are credited as
  92. its author.
  93. ## Licence
  94. Supersaas Analytics is fair source, under the [Functional Source License, Version 1.1, ALv2 Future
  95. License](LICENSE) (FSL-1.1-ALv2, see [fsl.software](https://fsl.software)).
  96. - You may self-host it for free and modify it for your own sites.
  97. - You may not sell it or offer it as a competing service.
  98. - Each release becomes Apache 2.0 two years after it is published.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.