Client Modes
Choose how c15t connects to its backend - full c15t integration, offline-only, or bring your own backend.
c15t supports three client modes that determine how consent data is stored and synchronized. Choose the mode that matches your infrastructure:
- c15t mode - Full backend integration with geolocation, API sync, and analytics
- Offline mode - Local-only storage with no network requests
- Custom mode - Bring your own backend with custom endpoint handlers
c15t Mode (Recommended)
The default mode. Connects to a c15t backend for full consent lifecycle management. We recommend using consent.io for a fully managed experience, but you can self-host as well.
What happens:
- On page load, the client calls
/initto fetch geolocation, jurisdiction, localized translation strings - When the user grants or changes consent, it is saved locally before being synced to the backend.
- If the backend is unreachable, it falls back to Offline mode and re-syncs with the backend when it's available
Configuration:
backendURL(required) - API endpoint path
Best for: Production apps that need geolocation-based jurisdiction detection, consent record storage, and compliance audit trails.
Offline Mode
No network requests. Consent is stored entirely in the browser using localStorage and cookies.
What happens:
- Default jurisdiction is GDPR unless manually set via
overrides - Consent preferences persist locally only
- No server-side consent records or analytics
Trade-offs:
- No automatic geolocation or jurisdiction detection
- No consent audit trail
- No cross-device sync
- Works without any backend infrastructure
Best for: Static sites, development/testing, or as a starting point before setting up a backend.
Custom Mode
Bring your own backend. You provide handler functions for each consent endpoint, and c15t calls them instead of making HTTP requests.
What happens:
- On page load, the client calls your endpoint handler to fetch geolocation, jurisdiction, localized translation strings
- When the user grants or changes consent, it is saved locally before being synced to the backend.
- If one of your handlers fails, c15t returns a handler error and keeps local consent state, but automatic offline fallback and retry queue behavior is not provided for custom handlers by default
This lets you integrate c15t with any existing API - your CRM, your own consent database, or a third-party compliance service.
Best for: Teams with existing consent infrastructure that want c15t's frontend without its backend.
Choosing a Mode
| Feature | c15t | Offline | Custom |
|---|---|---|---|
| Geolocation | Automatic | Manual via overrides | Your implementation |
| Consent sync | API | Local only | Your implementation |
| SSR data | Supported | Not available | Your implementation |
| Analytics | Built-in | Not available | Your implementation |
| Infrastructure | c15t backend | None | Your backend |
| Setup effort | Minimal | Zero | Moderate |