PageSourceSearch

https://lunarapp-urania-production.up.railway.app/static/js/firebase-config.js

js lunarapp-urania-production.up.railway.app collected 2026-10-03 12:12:56 UTC 1,996 bytes, 62 lines download raw bytes

1// Firebase Configuration for Lunar App
2// Configuración de Firebase Analytics
3
4// Import Firebase modules
5import { initializeApp } from "https://www.gstatic.com/firebasejs/12.6.0/firebase-app.js";
6import { getAnalytics, logEvent, setUserProperties } from "https://www.gstatic.com/firebasejs/12.6.0/firebase-analytics.js";
7
8// Firebase configuration
9const firebaseConfig = {
10    apiKey: "AIzaSyBFCoKP7w0lCTigVu0JJCtbQR7-JR6zVuo",
11    authDomain: "lunarapp-1ab4a.firebaseapp.com",
12    projectId: "lunarapp-1ab4a",
13    storageBucket: "lunarapp-1ab4a.firebasestorage.app",
14    messagingSenderId: "214363192026",
15    appId: "1:214363192026:web:3a4d0d14ffb53ecc0143e3",
16    measurementId: "G-TLLC1ZDBBX"
17};
18
19// Initialize Firebase
20const app = initializeApp(firebaseConfig);
21const analytics = getAnalytics(app);
22
23console.log('✅ Firebase Analytics inicializado');
24
25// Registrar apertura de app
26logEvent(analytics, 'app_open', {
27    timestamp: new Date().toISOString()
28});
29
30// Función para registrar eventos personalizados
31window.trackEvent = function(eventName, params = {}) {
32    logEvent(analytics, eventName, params);
33    console.log(`📊 Evento registrado: ${eventName}`, params);
34};
35
36// Función para registrar vista de página
37window.trackPageView = function(pageName) {
38    logEvent(analytics, 'page_view', {
39        page_title: pageName,
40        page_location: window.location.href,
41        page_path: window.location.pathname
42    });
43    console.log(`📄 Vista de página: ${pageName}`);
44};
45
46// Registrar vista de página automáticamente
47const pageName = document.title || 'Lunar App';
48trackPageView(pageName);
49
50// Detectar tipo de dispositivo
51const isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
52const deviceType = isMobile ? 'mobile' : 'desktop';
53
54setUserProperties(analytics, {
55    device_type: deviceType,
56    user_language: navigator.language
57});
58
59console.log(`📱 Dispositivo: ${deviceType}`);
60
61// Exportar para uso global
62window.firebaseAnalytics = analytics;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.