diff --git a/client/src/firebase/firebase.utils.js b/client/src/firebase/firebase.utils.js index d3964eaac..8f1518504 100644 --- a/client/src/firebase/firebase.utils.js +++ b/client/src/firebase/firebase.utils.js @@ -4,7 +4,7 @@ import { getAuth, updatePassword, updateProfile } from "@firebase/auth"; import { getFirestore } from "@firebase/firestore"; import { getMessaging, getToken, onMessage } from "@firebase/messaging"; import { store } from "../redux/store"; -import * as amplitude from '@amplitude/analytics-browser'; +//import * as amplitude from '@amplitude/analytics-browser'; import posthog from 'posthog-js' const config = JSON.parse(import.meta.env.VITE_APP_FIREBASE_CONFIG); @@ -91,14 +91,14 @@ export const logImEXEvent = (eventName, additionalParams, stateProp = null) => { // dbevent: false, // env: `master-AIO|${import.meta.env.VITE_APP_GIT_SHA_DATE}` // }); - console.log( - "%c[Analytics]", - "background-color: green ;font-weight:bold;", - eventName, - eventParams - ); + // console.log( + // "%c[Analytics]", + // "background-color: green ;font-weight:bold;", + // eventName, + // eventParams + // ); logEvent(analytics, eventName, eventParams); - amplitude.track(eventName, eventParams); + //amplitude.track(eventName, eventParams); posthog.capture(eventName, eventParams); } finally { diff --git a/client/src/index.jsx b/client/src/index.jsx index 610aa8aad..557ac9c43 100644 --- a/client/src/index.jsx +++ b/client/src/index.jsx @@ -14,7 +14,7 @@ import { persistor, store } from "./redux/store"; import reportWebVitals from "./reportWebVitals"; import "./translations/i18n"; import "./utils/CleanAxios"; -import * as amplitude from "@amplitude/analytics-browser"; +//import * as amplitude from "@amplitude/analytics-browser"; import { PostHogProvider } from "posthog-js/react"; import posthog from "posthog-js"; @@ -26,23 +26,23 @@ registerSW({ immediate: true }); // Dinero.globalLocale = "en-CA"; Dinero.globalRoundingMode = "HALF_EVEN"; -amplitude.init(import.meta.env.VITE_APP_AMP_KEY, { - defaultTracking: true, - serverUrl: import.meta.env.VITE_APP_AMP_URL - // { - // attribution: { - // excludeReferrers: true, - // initialEmptyValue: true, - // resetSessionOnNewCampaign: true, - // }, - // fileDownloads: true, - // formInteractions: true, - // pageViews: { - // trackHistoryChanges: 'all' - // }, - // sessions: true - // } -}); +// amplitude.init(import.meta.env.VITE_APP_AMP_KEY, { +// defaultTracking: true, +// serverUrl: import.meta.env.VITE_APP_AMP_URL +// // { +// // attribution: { +// // excludeReferrers: true, +// // initialEmptyValue: true, +// // resetSessionOnNewCampaign: true, +// // }, +// // fileDownloads: true, +// // formInteractions: true, +// // pageViews: { +// // trackHistoryChanges: 'all' +// // }, +// // sessions: true +// // } +// }); posthog.init(import.meta.env.VITE_PUBLIC_POSTHOG_KEY, { autocapture: false, diff --git a/client/src/redux/user/user.sagas.js b/client/src/redux/user/user.sagas.js index 1c50357cc..c508bf96e 100644 --- a/client/src/redux/user/user.sagas.js +++ b/client/src/redux/user/user.sagas.js @@ -49,7 +49,7 @@ import { validatePasswordResetSuccess } from "./user.actions"; import UserActionTypes from "./user.types"; -import * as amplitude from '@amplitude/analytics-browser'; +//import * as amplitude from '@amplitude/analytics-browser'; import posthog from 'posthog-js'; const fpPromise = FingerprintJS.load(); @@ -92,7 +92,7 @@ export function* isUserAuthenticated() { } LogRocket.identify(user.email); - amplitude.setUserId(user.email); + //amplitude.setUserId(user.email); posthog.identify(user.email); const eulaQuery = yield client.query({ @@ -139,7 +139,7 @@ export function* signOutStart() { imexshopid: state.user.bodyshop.imexshopid, type: "messaging" }); - amplitude.reset(); + //amplitude.reset(); } catch { console.log("No FCM token. Skipping unsubscribe."); } @@ -365,7 +365,7 @@ export function* SetAuthLevelFromShopDetails({ payload }) { } try { - amplitude.setGroup('Shop', payload.shopname); + //amplitude.setGroup('Shop', payload.shopname); window.$crisp.push(["set", "user:company", [payload.shopname]]); if (authRecord[0] && authRecord[0].user.validemail) { window.$crisp.push(["set", "user:email", [authRecord[0].user.email]]);