b58ea368ec
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.
17 lines
538 B
JavaScript
17 lines
538 B
JavaScript
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();
|