Initial commit: SIBU 2.0 MISSION

This commit is contained in:
2026-02-21 09:53:31 -05:00
commit 0c7aa53c8b
400 changed files with 67708 additions and 0 deletions

View File

@ -0,0 +1,22 @@
import { apiClient } from './apiClient'
export interface AnalyticsEvent {
event_name: 'app_open' | 'screen_view' | 'route_selected' | 'stop_selected' | 'schedule_viewed' | 'reminder_created' | 'promo_view' | 'promo_click' | 'taxi_view' | 'taxi_click' | 'shuttle_view' | 'shuttle_contact' | 'business_view' | 'business_contact'
screen_name?: string
item_id?: string
properties?: Record<string, any>
}
export const analyticsService = {
logEvent(event: AnalyticsEvent) {
// Log asynchronously without awaiting to avoid blocking UI
apiClient.post('/api/analytics/event', event).catch(error => {
console.warn('Analytics capture failed:', error)
})
},
async getStats() {
const response = await apiClient.get('/api/analytics/dashboard/stats')
return response.data
}
}