Overview
Compare different approaches to storing consent decisions in your application
c15t provides multiple approaches for storing consent decisions in your application. Each approach has different tradeoffs in terms of:
- Server requirements
- Data persistence
- Implementation complexity
- User experience
Available Storage Options
Storage Option | Description | Best For |
---|---|---|
Hosted c15t | Using consent.io managed service | Production apps with minimal backend maintenance |
Self-Hosting | Running your own c15t backend | Organizations requiring complete data control |
Offline Mode | Browser-based storage with no server | Simple implementations or dev environments |
Custom Client | Fully customized storage implementation | Complex integrations with existing systems |
Info
For most applications, we recommend starting with Hosted c15t (consent.io) for the simplest setup with the most features.
Choosing the Right Approach
Hosted c15t (Recommended)
consent.io provides a fully managed consent management backend with:
- Zero backend maintenance
- Built-in scaling and automatic updates
- Geographic jurisdiction detection
- Analytics dashboard
Learn more about Hosted c15t
Self-Hosting
Run your own c15t instance to maintain complete control over your data and infrastructure:
- Full control over data storage and security
- Integration with your existing database systems
- Customizable configuration
- No external service dependencies
Learn more about Self-Hosting
Offline Mode
Store consent decisions entirely in the browser without any server:
- Zero backend requirements
- Simplest implementation
- Works offline and in statically-hosted sites
- Perfect for development or simple use cases
Learn more about Offline Mode
Custom Client
Implement your own storage logic for complete control:
- Integration with existing consent management systems
- Fully customized storage mechanism
- Advanced caching and batching capabilities
- Complex multi-tenant scenarios
Learn more about Custom Client
Decision Guide
Info
Use this decision tree to determine which storage option best fits your needs.
-
Do you need consent data to persist across devices?
- No → Consider Offline Mode
- Yes → Continue to question 2
-
Do you need complete control over your consent data?
- No → Use Hosted c15t (consent.io)
- Yes → Continue to question 3
-
Do you have an existing consent management system?
- No → Use Self-Hosting
- Yes → Consider Custom Client
Creating a Client
The main factory function configureConsentManager
creates the appropriate client implementation based on the provided options:
Global Callback Events
All client modes support the following callback events:
When to Use Each Mode
Info
Choosing the right mode depends on your specific requirements and constraints.
- c15t Mode: For production applications with a real c15t backend
- Offline Mode: For production applications with your own backend systems, or when you want to eliminate external service dependencies
- Custom Mode: When you need to integrate with an existing consent system but still want to implement custom HTTP request handling
What's Next
Choose the storage approach that best fits your needs:
- Hosted c15t - Use consent.io for a managed solution
- Self-Hosting - Run your own c15t instance
- Offline Mode - Store consent in the browser
- Custom Client - Implement your own storage logic
Last updated: April 15, 2025