Everything in one loud dashboard
PostCow replaces the awkward duo of "analytics SaaS + error SaaS" with a single ~2 KB script and a dashboard that shows traffic and crashes side by side. Self-host on your own infrastructure — free and open source.
Pageview tracking
Automatic pageviews on load. Pathname, referrer, URL — enough context without creepy IDs.
- Fires on window load via deferred script
- Captures pathname, full URL, referrer, user agent
- 7-day trend charts and daily breakdowns
- Top pages ranked with bar visualization
Custom events
PostCow.track("signup_clicked", { source: "hero" }) — fire funnels without a PhD.
- Arbitrary event names with JSON properties
- Same ingest pipeline as pageviews
- Attach metadata: button ID, experiment variant, campaign source
- Works from inline handlers or app code
Error grouping
Fingerprint by message + stack frame. See count, first/last seen, recent samples.
- window.onerror for sync exceptions
- unhandledrejection for failed promises
- Grouped issues with occurrence count
- Click-through issue pages with stack traces and URL context
Self-hostable
SvelteKit app + Supabase Postgres. Run on Vercel, your VPS, or locally in dev.
- Data in your Supabase project — you control retention
- No external database required for demo/small scale
- Deploy anywhere SvelteKit runs
- AGPL-friendly open source
CORS-friendly ingest
Capture API accepts cross-origin beacons from any site with a valid project key.
- POST /api/v1/capture with JSON body
- Preflight-friendly for fetch fallback
- navigator.sendBeacon for unload reliability
- Per-domain API keys scope traffic
Neo-brutalist UI
Thick borders, colored shadows, readable charts — brutalist but PostCow purple.
- Signal and Terminal theme palettes
- High-contrast metrics and bar charts
- Mobile nav for dashboard on the go
- Copy buttons for snippets and keys
How each piece works
Traffic you can actually read
PostCow analytics answer the questions indie devs ask first: "Did anyone visit?" and "Which page?" — not "What's the cohort retention of users who saw button B on Tuesday." Every pageview stores pathname, referrer, timestamp, and URL. The dashboard shows today's count, rolling 7-day volume, unique paths, and a daily bar chart. Top pages rank by hit count with proportional bars so you spot spikes at a glance. Recent pageviews table lists the last hits with referrer and time — enough to debug a bad UTM link or confirm a deploy went live.
- Daily + weekly aggregates
- Referrer preserved
- No sampling
- Per-domain isolation
Crash reports without the bloat
The PostCow.js snippet registers global error handlers on load. Sync throws and unhandled promise rejections both POST to the same capture endpoint with message, stack, URL, and pathname. Server-side grouping collapses duplicate crashes into one issue with a count, first-seen, and last-seen timestamp. Expand an issue to read the latest stack trace and the page URL where it fired. No source maps upload yet — but for many apps, message + top stack frame is enough to find the typo.
- Auto-capture on load
- Promise rejection support
- Issue fingerprinting
- Sample stack retention
One endpoint, three event types
All telemetry flows through POST /api/v1/capture. The browser snippet sends pageview, error, and event payloads with a shared apiKey field. sendBeacon tries first for reliability on tab close; fetch with keepalive is the fallback. Server validates the key, associates events with the domain/project, and persists to Supabase. CORS headers allow cross-origin posts from customer sites when the key matches. Power users can POST directly from server-side jobs — useful for backend errors you want in the same inbox.
- pageview | error | event types
- JSON body
- Beacon + fetch
- CORS enabled
Works where you ship
No official SDKs required — the global PostCow object is the API. Framework guides live in the docs.
Static HTML
Paste snippet before </body>
SvelteKit / Svelte
app.html or layout + pageview() on navigate
Next.js
Script in root layout; call pageview in usePathname effect
Astro
Base layout component with client:load optional
Vue / Nuxt
Router afterEach → PostCow.pageview()
WordPress
Footer hook or plugin — one line in theme
Dashboard surfaces
Domains
Register hostnames, copy snippets, jump into per-domain overview with weekly stats and recent errors.
Analytics
Top pages, recent pageviews table, referrer column — enough to validate campaigns and content changes.
Errors
Grouped issues sorted by recency. Click through for stack traces, URLs, and occurrence history.
Wire it up.
Paste the snippet, deploy, watch the dashboard populate.