JavaScript library for device fingerprinting and fraud prevention in Conekta payment applications. Collects comprehensive device data using FingerprintJS to enhance security and reduce fraud risk.
npm install conekta-device-data-collectorJavaScript library for device fingerprinting and fraud prevention in Conekta payment applications. Collects comprehensive device data using FingerprintJS to enhance security and reduce fraud risk.
- Fraud Prevention: Advanced device identification using FingerprintJS
- Easy Implementation: Simple API with minimal configuration
- Auto-Loading: FingerprintJS loads automatically when needed
- TypeScript: Complete typing for better development
- CDN Ready: Works seamlessly via CDN or NPM
- HTTP/HTTPS Support: Reliable UUID generation in both secure and non-secure contexts
bash
npm install conekta-device-data-collector
`$3
`html
`🛠️ Quick Start
$3
`javascript
import ConektaDeviceDataCollector from 'conekta-device-data-collector';await ConektaDeviceDataCollector.init({
publicKey: 'your_public_key_here'
});
`$3
`html
`📚 API Reference
$3
`typescript
interface DeviceDataCollectorCustomConfig {
publicKey: string; // Required public key
sessionId?: string; // Custom session ID (optional)
fingerprintVisitorId?: string; // Custom visitor ID (optional)
metadata?: Record; // Additional metadata (optional)
}await ConektaDeviceDataCollector.init(config);
`$3
`typescript
const sessionId = ConektaDeviceDataCollector.getSessionId();
`$3
`typescript
ConektaDeviceDataCollector.on('initialized', (event) => {
console.log('Device Data Collector initialized', event.data);
});ConektaDeviceDataCollector.on('data_collected', (event) => {
console.log('Data collected', event.data);
});
ConektaDeviceDataCollector.on('error', (event) => {
console.error('Error in Device Data Collector', event.error);
});
`$3
`typescript
ConektaDeviceDataCollector.destroy();
`
🛡️ Security & Fraud Prevention
$3
- Advanced Device Identification: Uses FingerprintJS for robust device identification
- Suspicious Behavior Detection: Collects data for risk analysis
- Input Validation: Complete validation of configuration and data
- Secure Error Handling: No sensitive information exposed in errors
- Retry Logic: Intelligent handling of network failures$3
- Browser information (User Agent, language, platform)
- Screen information (resolution, color depth)
- Hardware information (device memory, CPU cores)
- Location information (timezone, current URL)
- Fingerprint visitor ID
- Metadata provided by the user📋 Requirements
- Browsers: Chrome 60+, Firefox 55+, Safari 12+, Edge 79+
- APIs: fetch, sessionStorage, crypto.randomUUID, navigator, screen, location
- Dependencies: None! FingerprintJS loads automatically
🤝 Contributing
1. Fork the project
2. Create your feature branch (
git checkout -b feature/AmazingFeature)
3. Commit your changes (git commit -m 'Add some AmazingFeature')
4. Push to the branch (git push origin feature/AmazingFeature)
5. Open a Pull Request📄 License
This project is licensed under the MIT License. See the
LICENSE` file for details.- Documentation: docs.conekta.com
- Issues: GitHub Issues
- Email: support@conekta.com
- Conekta Documentation
- NPM Package
- Installation Guide
- Changelog