Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@click-chutney/analytics

clickchutney90MIT3.0.0TypeScript support: included

Complete website analytics solution. Everything you need to understand your visitors - no Google Analytics required.

analytics, tracking, web-analytics, website-analytics, visitor-tracking, privacy-first, self-hosted, react, nextjs, javascript, typescript, clickchutney, conversion-tracking, audience-insights, real-time-analytics

readme

🥭 ClickChutney Analytics

Complete website analytics solution. Everything you need - no Google Analytics required.

Stop sending your visitor data to Google. Get powerful, privacy-first analytics that you own and control.

npm version Downloads License: MIT

✨ Why Choose ClickChutney?

  • 🏠 Fully Self-Hosted - Your data stays on your servers
  • 🔒 Privacy by Design - GDPR compliant, no tracking cookies
  • 📊 Everything You Need - Page views, conversions, funnels, real-time data
  • Auto-Tracking - Works out of the box with zero configuration
  • 🚀 Blazing Fast - < 15KB bundle, loads instantly
  • 🎯 Conversion Focused - Track goals, sales, and business metrics
  • 👥 Team Ready - Multi-user dashboard with role-based access
  • 💰 Cost Effective - No per-pageview pricing, unlimited tracking

🚀 Super Simple Setup

For React/Next.js

npm install @click-chutney/analytics

One line setup - that's it!

import ClickChutney from '@click-chutney/analytics'

// Initialize and track automatically
const analytics = ClickChutney.simple('your-tracking-id', {
  autoTrack: true,    // Track page views, clicks, forms automatically
  debug: true         // See what's happening in console
})

// Manual tracking (optional)
analytics.track('signup', { plan: 'premium' })
analytics.conversion('purchase', 29.99, 'USD')
analytics.identify('user-123', { email: 'user@example.com' })

For HTML/WordPress

<!-- Add before closing </head> -->
<script src="https://unpkg.com/@click-chutney/analytics@latest/dist/clickchutney.min.js"></script>
<script>
  const analytics = analytics('your-tracking-id');
  // That's it! Everything is tracked automatically
</script>

📊 What Gets Tracked Automatically

Zero configuration required - ClickChutney tracks everything important:

  • Page Views - Every page visit, including SPA navigation
  • User Engagement - Time on page, scroll depth, active time
  • Click Tracking - Button clicks, link clicks, CTA interactions
  • Form Submissions - Contact forms, newsletter signups, any form
  • File Downloads - PDFs, images, documents, media files
  • Outbound Links - Clicks to external websites
  • Traffic Sources - Where visitors come from (referrers, campaigns)
  • Device Info - Browser, OS, device type (privacy-safe)
  • Geographic Data - Country, city (IP-based, anonymized)

🎯 Business-Focused Features

Conversion Tracking

// Track sales and revenue
analytics.conversion('purchase', 99.99, 'USD')
analytics.conversion('signup', 0, 'USD')
analytics.conversion('demo_request')

// E-commerce tracking
analytics.ecommerce('purchase', {
  transactionId: 'order-123',
  value: 149.99,
  currency: 'USD',
  items: [
    { name: 'Product A', price: 99.99, category: 'electronics' },
    { name: 'Shipping', price: 50.00, category: 'shipping' }
  ]
})

User Identification

// Track logged-in users
analytics.identify('user-123', {
  email: 'john@example.com',
  plan: 'premium',
  signupDate: '2024-01-15'
})

Custom Event Tracking

// Track anything important to your business
analytics.track('video_watched', { 
  title: 'Product Demo',
  duration: 120,
  completed: true 
})

analytics.track('feature_used', { 
  feature: 'export',
  plan: 'premium' 
})

📈 Dashboard Features

Your ClickChutney dashboard shows everything you need:

📊 Real-Time Analytics

  • Live visitor count
  • Active pages being viewed
  • Real-time conversions
  • Current traffic sources

📈 Core Reports

  • Overview - Key metrics at a glance
  • Pages - Most popular content
  • Traffic Sources - Where visitors come from
  • Conversions - Goals and sales tracking
  • Audience - Visitor demographics and behavior

🎯 Business Intelligence

  • Conversion Funnels - See where users drop off
  • User Journeys - Track paths to conversion
  • Cohort Analysis - User retention over time
  • Custom Segments - Filter by any criteria

👥 Team Collaboration

  • Multiple team members
  • Role-based permissions
  • Shared dashboards
  • Export reports

🔒 Privacy & Compliance

Built for the privacy-first world:

  • GDPR Compliant - Respects user privacy by default
  • No Cookies - Uses privacy-safe localStorage
  • Anonymized Data - IP addresses are anonymized
  • Do Not Track - Respects browser DNT settings
  • Data Ownership - Your data stays on your servers
  • Transparent - Open source, audit the code yourself

⚡ Performance

Designed to be invisible to your users:

  • < 15KB gzipped - Smaller than most images
  • < 50ms initialization - Loads instantly
  • Non-blocking - Never slows down your site
  • Offline support - Queues events when offline
  • Auto-retry - Reliable event delivery

🔗 Real-World Examples

SaaS Application

const analytics = ClickChutney.simple('cc_saas_app', {
  autoTrack: true,
  trackOutbound: true,
  debug: false
})

// Track feature usage
analytics.track('feature_used', { feature: 'dashboard' })

// Track conversions
analytics.conversion('trial_started')
analytics.conversion('subscription', 29.99, 'USD')

// Identify users
analytics.identify('user-456', {
  plan: 'pro',
  company: 'Acme Corp',
  mrr: 29.99
})

E-commerce Site

const analytics = ClickChutney.simple('cc_ecommerce', {
  autoTrack: true,
  trackScrolls: true,
  trackClicks: true
})

// Track product views
analytics.track('product_view', {
  productId: 'prod-123',
  category: 'electronics',
  price: 299.99
})

// Track cart events
analytics.track('add_to_cart', {
  productId: 'prod-123',
  value: 299.99
})

// Track purchases
analytics.ecommerce('purchase', {
  transactionId: 'order-789',
  value: 299.99,
  currency: 'USD'
})

Content Site

const analytics = ClickChutney.simple('cc_blog', {
  autoTrack: true,
  trackScrolls: true, // Track reading engagement
  trackOutbound: true // Track external link clicks
})

// Track content engagement
analytics.track('article_read', {
  title: 'How to Build Better Software',
  category: 'development',
  readTime: 180
})

// Track newsletter signups
analytics.conversion('newsletter_signup')

🚀 Migration from Google Analytics

Switching is easy - ClickChutney provides everything GA does and more:

Google Analytics ClickChutney Better Because
Page views ✅ Auto-tracked No configuration needed
Custom events track() method Simpler API
Conversions/Goals conversion() method Built-in revenue tracking
E-commerce ecommerce() method More flexible
User ID identify() method Links all user actions
Real-time ✅ Live dashboard Faster updates
Segments ✅ Custom filters More powerful
Funnels ✅ Built-in Better visualization

No data loss - Import your historical data with our migration tools.

💰 Pricing

Simple, fair pricing:

  • Free Plan - 10,000 page views/month
  • Starter - $9/month - 100k page views
  • Professional - $29/month - 1M page views
  • Enterprise - Custom pricing - Unlimited

No surprises:

  • No per-user fees
  • No data sampling
  • No limits on custom events
  • No limits on conversions
  • Cancel anytime

📄 License

MIT © ClickChutney Team


Ready to own your analytics? Get started free →

Questions? We're here to help: support@clickchutney.com