feat: integrate Rybbit analytics alongside OpenPanel
Some checks failed
Build and Deploy / build (push) Has been cancelled

- Add RybbitService for tracking e-commerce events
- Update useAnalytics hook to track with both OpenPanel and Rybbit
- Add Rybbit script to layout for page view tracking
- Track all applicable store events: product views, cart, checkout, orders, search, etc.
This commit is contained in:
Unchained
2026-03-31 00:38:38 +02:00
parent 044aefae94
commit b3efebd3e4
11 changed files with 1422 additions and 118 deletions

40
public/debug-op.js Normal file
View File

@@ -0,0 +1,40 @@
// OpenPanel Debug Script
// Run this in browser console to test OpenPanel
(function debugOpenPanel() {
console.log('=== OpenPanel Debug ===');
// Check if OpenPanel is loaded
if (typeof window.op === 'undefined') {
console.error('❌ OpenPanel SDK not loaded (window.op is undefined)');
console.log('Script URL should be:', 'https://op.nodecrew.me/op1.js');
return;
}
console.log('✅ OpenPanel SDK loaded');
console.log('window.op:', window.op);
// Check client ID
const clientId = window.op._clientId || 'not set';
console.log('Client ID:', clientId);
// Try to track an event
console.log('Attempting to track test event...');
window.op.track('debug_test', { source: 'console', timestamp: new Date().toISOString() })
.then(() => console.log('✅ Track successful'))
.catch(err => console.error('❌ Track failed:', err));
// Check network requests
console.log('');
console.log('Check Network tab for requests to:');
console.log('- https://manoonoils.com/api/op/track');
console.log('- https://op.nodecrew.me/api/track');
// Common issues
console.log('');
console.log('Common issues:');
console.log('1. Ad blockers (try disabling uBlock/AdBlock)');
console.log('2. CORS errors (check console for red errors)');
console.log('3. Do Not Track enabled in browser');
console.log('4. Private/Incognito mode (some blockers active)');
})();