# Semust.js

Lightweight, privacy-focused web analytics tracking script.

## Features

✅ **Page view tracking** - Traditional and SPA route changes
✅ **Event tracking** - Clicks, form submissions, custom events
✅ **Performance monitoring** - Web Vitals (FCP, LCP, CLS, TTFB, INP)
✅ **User fingerprinting** - Privacy-friendly visitor identification
✅ **Session management** - Automatic session tracking
✅ **Bot detection** - Filter out bots and crawlers

## Installation

### Via CDN

```html
<script src="https://cdn.jsdelivr.net/npm/semust-js@latest/dist/semust-js.min.js"
        data-token="YOUR_TOKEN_HERE"></script>
```

### Self-Hosted

```html
<script src="/path/to/semust-js.min.js"
        data-token="YOUR_TOKEN_HERE"></script>
```

## Quick Start

1. **Get your access token** from [semust.com](https://semust.com/en)
2. **Add the script** to your website with your token
3. **That's it!** Analytics data will automatically be collected

## Configuration

### Basic Setup

```html
<script src="semust-js.min.js" data-token="your-token-123"></script>
```

### Cookieless Mode

```html
<script src="semust-js.min.js"
        data-token="your-token-123"
        data-cookieless="1"></script>
```

## What's Tracked?

- **Page Views**: Initial loads and SPA route changes
- **Clicks**: User interactions with elements
- **Forms**: Form submissions
- **Performance**: Core Web Vitals metrics
- **Sessions**: User visit sessions
- **Device Info**: Browser, OS, screen resolution

## Privacy & Security

- ✅ **No PII collected** - No personal data tracked
- ✅ **GDPR compliant** - Respects user privacy
- ✅ **Bot filtering** - Automatic bot detection
- ✅ **Cookieless option** - Works without cookies

## Documentation

For detailed documentation, API reference, and advanced configuration:

👉 **[Visit semust.com/en](https://semust.com/en)**

## Support

- **Website**: [semust.com](https://semust.com)

## License

ISC © Ramazan Umutlu
