{{ session('success') }}
Copy your new API token now — it won't be shown again.
{{ session('newToken') }}
Generate a token to access the analytics API programmatically.
No API tokens yet. Create one above to get started.
{{ $token->name }}
Created {{ $token->created_at->diffForHumans() }} @if ($token->last_used_at) · Last used {{ $token->last_used_at->diffForHumans() }} @else · Never used @endif
Use your token in the Authorization header to access the API.
curl -H "Authorization: Bearer YOUR_TOKEN" \
{{ url('/api/v1/websites') }}
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/websites | List your websites |
| GET | /api/v1/websites/{id}/stats | Summary metrics + timeseries |
| GET | /api/v1/websites/{id}/pages | Top pages by views |
| GET | /api/v1/websites/{id}/referrers | Traffic sources |
| GET | /api/v1/websites/{id}/events | Events report |
| GET | /api/v1/websites/{id}/visitors | Audience breakdown |
All endpoints accept optional from and to query params (YYYY-MM-DD). Default: last 7 days. Rate limit: 60 requests/minute per token.