[+] GA4 (Google analytics 4) default integration

This commit is contained in:
Charles Le Maux 2024-07-10 15:34:03 +01:00
parent 1e111b4b47
commit b6b7171eb3

View File

@ -1,5 +1,6 @@
// src/firebase.js // src/firebase.js
import { initializeApp } from 'firebase/app'; import { initializeApp } from 'firebase/app';
import { getAnalytics } from 'firebase/analytics';
import { getAuth, GoogleAuthProvider, signInWithPopup } from 'firebase/auth'; import { getAuth, GoogleAuthProvider, signInWithPopup } from 'firebase/auth';
import { getFirestore, doc, getDoc } from 'firebase/firestore'; import { getFirestore, doc, getDoc } from 'firebase/firestore';
@ -9,10 +10,12 @@ const firebaseConfig = {
projectId: "servi-e6705", projectId: "servi-e6705",
storageBucket: "servi-e6705.appspot.com", storageBucket: "servi-e6705.appspot.com",
messagingSenderId: "201267205657", messagingSenderId: "201267205657",
appId: "1:201267205657:web:f38e37d16f376d68b73c88" appId: "1:201267205657:web:f38e37d16f376d68b73c88",
measurementId: "G-KCC9E816LG",
}; };
const app = initializeApp(firebaseConfig); const app = initializeApp(firebaseConfig);
const analytics = getAnalytics();
const auth = getAuth(app); const auth = getAuth(app);
const googleProvider = new GoogleAuthProvider(); const googleProvider = new GoogleAuthProvider();