Skip to content

Commit

Permalink
🔥 Remove analytics and performance tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
leodr committed Feb 1, 2021
1 parent ace67e0 commit b0ae502
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
3 changes: 0 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
NEXT_PUBLIC_FIREBASE_API_KEY=
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=
NEXT_PUBLIC_FIREBASE_PROJECT_ID=
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=
NEXT_PUBLIC_FIREBASE_APP_ID=
NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID=
FIREBASE_PRIVATE_KEY=
FIREBASE_CLIENT_EMAIL=
14 changes: 0 additions & 14 deletions src/firebase/client.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,16 @@
import "firebase/analytics";
import firebase from "firebase/app";
import "firebase/auth";
import "firebase/firestore";
import "firebase/performance";

const clientCredentials = {
apiKey: process.env.NEXT_PUBLIC_FIREBASE_API_KEY,
appId: process.env.NEXT_PUBLIC_FIREBASE_APP_ID,
authDomain: process.env.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN,
measurementId: process.env.NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID,
messagingSenderId: process.env.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID,
projectId: process.env.NEXT_PUBLIC_FIREBASE_PROJECT_ID,
storageBucket: process.env.NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET,
};

if (!firebase.apps.length) {
firebase.initializeApp(clientCredentials);

// Check that `window` is in scope for the analytics module!
if (typeof window !== "undefined") {
// Enable analytics. https://firebase.google.com/docs/analytics/get-started
if ("measurementId" in clientCredentials) {
firebase.analytics();
firebase.performance();
}
}
}

export { firebase };
Expand Down

0 comments on commit b0ae502

Please sign in to comment.