# Ucoder Insights
> Ucoder Insights is a lightweight, privacy-first, cookie-free web analytics platform built for developers. It is a free and open source alternative to Google Analytics, Plausible, and Mixpanel — with no cookies, no IP storage, and full GDPR compliance.
## What is Ucoder Insights?
Ucoder Insights is a production-ready analytics SaaS platform for developers who want clean, privacy-respecting website analytics. It does not use cookies, does not collect personal data, and requires no cookie consent banner.
It is completely free, open source, and embeds into any website or web app via a lightweight NPM package or script tag.
## Who is it for?
- Developers who want a Google Analytics alternative without privacy concerns
- Startups and indie hackers who need simple visitor insights for free
- Businesses that must comply with GDPR, CCPA, or similar privacy regulations
- Next.js, React, and Vue developers who want a drop-in analytics solution
- Anyone looking for a Plausible Analytics alternative that is completely free
## How is it different from Google Analytics, Plausible, and Mixpanel?
| Feature | Ucoder Insights | Google Analytics (GA4) | Plausible | Mixpanel |
|---|---|---|---|---|
| Price | Free (Pro plan currently free, paid tiers coming soon) | Free (limited) | Paid (€9/mo+) | Free + Paid |
| Cookie-free | Yes | No | Yes | No |
| GDPR compliant | Yes | Requires setup | Yes | Requires setup |
| Offline support | Yes (IndexedDB) | No | No | No |
| Open source | Yes | No | Yes | No |
| Script size | ~7.4KB (minified + gzipped) | ~45KB | ~1KB | ~30KB |
| Error tracking | Yes | No | No | Yes |
| Core Web Vitals | Yes | Yes | No | No |
## Key Features
- Privacy-first analytics — no cookies, no IP storage, no personal data
- Cookie-free tracking — no consent banner required
- GDPR and CCPA compliant out of the box
- Offline support — events are stored in IndexedDB when the user is offline and synced automatically when the connection is restored. Zero data loss even on flaky networks
- Reliable event delivery — uses the sendBeacon API for reliable event delivery on page unload, ensuring no events are lost when users navigate away
- Batch processing — events are batched every 10 seconds, with up to 50 events per batch, for optimal performance and reduced server load
- Real-time-like dashboard — data appears within seconds of events being sent
- Page view and unique visitor tracking
- Session tracking with session duration
- Referrer tracking — know where your traffic comes from
- Device, browser, and OS detection
- Country and region geolocation (IP is never stored)
- Core Web Vitals monitoring — LCP, FID, CLS, FCP
- JavaScript error tracking with stack traces
- Custom event tracking — track any user interaction
- Auto tracking — page views, referrers, device, browser, geolocation, and session data tracked automatically
- 404 error tracking
- Outbound link tracking
- Scroll depth tracking
- Multi-website support from one dashboard
- Delete all data anytime with one click
- Export all data with one click
- 90-day data retention by default
- 99%+ uptime on Microsoft Azure and Cloudflare CDN
- Lightweight — ~7.4KB minified and gzipped, zero impact on Core Web Vitals
- TypeScript support
- Open source NPM package (MIT license)
- Pro plan currently available for free during early access — paid tiers will be introduced in the future
- No event rate limits or quotas — send as many events as you want
## How to Use
### Option 1 — NPM Package (Recommended for React/Next.js)
```bash
npm install ucoder-insight
```
```javascript
import { initUcoderInsight } from "ucoder-insight";
useEffect(() => {
initUcoderInsight("YOUR_PROJECT_ID");
}, []);
```
### Option 2 — Next.js App Router
```tsx
import { initUcoderInsight } from "ucoder-insight";
initUcoderInsight("YOUR_PUBLIC_TRACKING_ID", {
notFoundPath: "/404",
notTrackPaths: ["/admin", "/secret", "/admin/*"],
debug: true,
});
```
### Option 3 — Script Tag (Any website)
```html
```
## Architecture
- **Event batching** — Events are queued client-side and sent in batches every 10 seconds, with up to 50 events per batch, reducing server load and improving performance
- **Offline resilience** — Uses IndexedDB to persist unsent events locally. When the user goes offline, events are stored in IndexedDB. When the connection is restored, all pending events are automatically flushed. No analytics data is ever lost. Currently supports up to 50 batches stored offline
- **Reliable delivery** — Uses the sendBeacon API to ensure events are reliably delivered even when users close the tab or navigate away, where traditional fetch or XHR calls would fail
- **Privacy by design** — No cookies, no IP addresses stored, no fingerprinting, no cross-site tracking
- **Lightweight** — Async script loading, zero impact on page speed or Core Web Vitals
## Data Collected (Anonymized)
- Page URL and referrer URL
- Page duration and session duration
- Unique visitor count (anonymized, no user ID stored)
- Core Web Vitals (LCP, FID, CLS, FCP)
- Click, scroll, error, page view, and outbound link events
- Device type (mobile, desktop, tablet)
- Browser name and version
- Country and region (via IP geolocation — IP is never stored)
- Custom events
## Frequently Asked Questions
**Can I delete all my data?**
Yes. You can delete all your analytics data with one click from the API section of the dashboard. No personal data is stored, so there is no risk of retaining personally identifiable information.
**Can I monitor my SDK event requests?**
Yes. You can see all SDK event requests in the API usage section of the dashboard — including request count, batch count, and error count for up to the last 7 days. This helps ensure your analytics events are being sent correctly and makes troubleshooting easy.
**Is Ucoder Insights a good Google Analytics alternative?**
Yes. It is free, cookie-free, GDPR compliant, and works with Next.js, React, and Vue. Unlike GA4, it does not use cookies or collect personal data.
**Is Ucoder Insights a good Plausible alternative?**
Yes. It has similar privacy features to Plausible but is completely free. It also adds error tracking, Core Web Vitals monitoring, and offline support via IndexedDB — features Plausible does not offer.
**Does it work offline?**
Yes. Events are stored in IndexedDB when the user is offline. When the connection is restored, all pending events are automatically synced to the server. No data is lost. The offline queue currently supports up to 50 batches. This feature is actively being improved.
**How are events delivered reliably?**
Ucoder Insights uses the sendBeacon API for event delivery on page unload, ensuring events are not dropped when users navigate away or close the tab — a common failure point for analytics tools that use fetch or XMLHttpRequest.
**Is it GDPR compliant?**
Yes. No cookies, no permanent IP storage, no personal data collected. No cookie consent banner needed.
**Does it slow down my website?**
No. The script is ~7.4KB (minified and gzipped) and loads asynchronously. Zero impact on Core Web Vitals.
**Is it free?**
Yes. All features including the Pro plan are currently available for free during early access. Paid tiers will be introduced in the future — existing users will be notified before any changes.
**Does it work with Next.js?**
Yes. Fully compatible with Next.js App Router and Pages Router.
**Is there a REST API?**
A REST API for sending analytics data to your own backend or data warehouse is currently in development.
## NPM Package
- Package: ucoder-insight
- Registry: https://www.npmjs.com/package/ucoder-insight
- Version: 1.1.3
- License: MIT
- Keywords: web analytics, privacy-first, GDPR compliant, cookie-free, Google Analytics alternative, Plausible alternative, Next.js analytics, React analytics, offline analytics, IndexedDB analytics, sendBeacon analytics
## Tech Stack
- Frontend: Next.js, TypeScript, Tailwind CSS, Chart.js, shadcn/ui
- Backend: Node.js, Express.js, BullMQ, Redis
- Database: MongoDB (analytics data), PostgreSQL (user and account data)
- Infrastructure: Docker, Nginx, Microsoft Azure
- CDN: Cloudflare CDN for global performance
- Monitoring: PM2, Ucoder Insights own analytics dashboard
## Links
- Platform: https://insights.ucoder.in
- Documentation: https://insights.ucoder.in/docs
- NPM: https://www.npmjs.com/package/ucoder-insight
- GitHub: https://github.com/soumydip/ucoder_insight_core
- Playground: https://insights.ucoder.in/playground
- Changelog: https://insights.ucoder.in/docs/changelog
## Developer
Built by Soumyadip Maity, Full Stack Developer, West Bengal, India.
- Portfolio: https://soumyadip.ucoder.in
- GitHub: https://github.com/soumyadip
- Twitter: https://twitter.com/soumyadip2maity