He vinculado Firebase Analytics al proyecto Firebase recientemente, pero recibo el siguiente error en mi consola e incluso no se ve nada en el panel de análisis de Firebase.
[2022-04-11T06:07:13.736Z] @firebase/analytics: The measurement ID in the local Firebase config (G-XXXXXXXXX) does not match the measurement ID fetched from the server (undefined). To ensure analytics events are always sent to the correct Analytics property, update the measurement ID field in the local config or remove it from the local config.Así es como estoy agregando análisis.
const firebaseConfig = { apiKey: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", authDomain: "*****************", projectId: "********", storageBucket: "*********", messagingSenderId: "********", appId: "*******************************", measurementId: "G-XXXXXXXXX" }; const app = firebase.initializeApp(firebaseConfig) const auth = getAuth(app) const db = getFirestore(app) firebase.analytics() const analytics = getAnalytics(app); console.log(analytics)¿Alguien puede ayudar qué es exactamente lo que me estoy perdiendo? Cualquier ayuda es apreciada.
Si alguien ve este error, entonces, en mi caso, el problema fue que implementé Firebase Analytics después de crear el proyecto, no mientras lo creaba. Así que tomó 24 horas para reflexionar. Y después de 24 horas todo estaba funcionando.