Add minio support and forntend analitycs

This commit is contained in:
Urtzi Alfaro
2026-01-17 22:42:40 +01:00
parent fbc670ddb3
commit 3c4b5c2a06
53 changed files with 3485 additions and 437 deletions

View File

@@ -0,0 +1,33 @@
import {
trackPageView,
trackUserAction,
trackUserLocation,
trackSession,
getCurrentUserId,
isAnalyticsEnabled
} from '../utils/analytics';
/**
* React Hook for analytics
*
* NOTE: Page view tracking is handled globally by initializeAnalytics() in main.tsx.
* This hook only exposes tracking functions for use in components.
* Do NOT add automatic page tracking here to avoid duplicate events.
*/
export const useAnalytics = () => {
return {
// Manual page view tracking (use only for custom page events, not navigation)
trackPageView,
// Track user actions (button clicks, form submissions, etc.)
trackUserAction,
// Track user location (requires consent)
trackUserLocation,
// Track session (typically called once at app init)
trackSession,
// Get current user ID
getCurrentUserId,
// Check if analytics are enabled
isAnalyticsEnabled
};
};