lanesdotdev-analytics
v0.1.2
Published
Analytics package for Lanes.dev
Downloads
10
Maintainers
Readme
Lanes.dev Analytics
A lightweight, privacy-friendly analytics package for tracking website visitors.
Get your api key from https://lanes.dev after signing up and creating your free project (no credit card required)
Installation
Option 1: NPM (Recommended)
npm i lanesdotdev-analytics
# or
yarn add lanesdotdev-analytics
# or
pnpm add lanesdotdev-analyticsOption 2: Script Tag
For static websites or quick setup:
<script type="module">
import { Analytics } from 'https://unpkg.com/[email protected]/dist/index.js';
new Analytics({
apiKey: 'your-api-key'
});
</script>Usage
import { Analytics } from 'lanesdotdev-analytics';
// Initialize analytics
const analytics = new Analytics({
apiKey: 'your-api-key'
});The snippet will automatically:
- Track page views
- Support Single Page Applications
- Work in development and production
Features
- 🔒 Privacy-friendly tracking
- 🚀 Zero configuration
- 📊 Real-time analytics
- 🌐 SPA support
- ⚡ Lightweight bundle
Development
# Install dependencies
pnpm install
# Build
pnpm build
# Development mode
pnpm devLicense
MIT
