feat(firebase): Add Firebase SDK and initialize Analytics
This commit integrates the Firebase SDK into the application to enable Firebase services, starting with Google Analytics. Key changes include: - Added the `firebase` package as a dependency. - Included Firebase project configuration variables in the production environment file. - Created a new `firebase.ts` utility to centralize Firebase app initialization. - Integrated the `FirebaseAnalytics` component into the root layout to enable analytics tracking across the entire application.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
importScripts("https://www.gstatic.com/firebasejs/8.10.0/firebase-app.js");
|
||||
importScripts(
|
||||
"https://www.gstatic.com/firebasejs/8.10.0/firebase-messaging.js",
|
||||
);
|
||||
|
||||
firebase.initializeApp({
|
||||
apiKey: "AIzaSyCTjdsk2jE34IfnvSKP1JMTIf_Abd7tbt0",
|
||||
authDomain: "opplens-270d1.firebaseapp.com",
|
||||
projectId: "opplens-270d1",
|
||||
storageBucket: "opplens-270d1.firebasestorage.app",
|
||||
messagingSenderId: "6923326255",
|
||||
appId: "1:6923326255:web:584a017e8e1bd0e4ed87da",
|
||||
measurementId: "G-VQW40G8VKC",
|
||||
});
|
||||
|
||||
const messaging = firebase.messaging();
|
||||
Reference in New Issue
Block a user