Merge pull request #589 from bugout-dev/mixpanel-improvements

added schema version to mixpanel analytics
alpha
Tim Pechersky 2022-04-21 10:58:09 +01:00 zatwierdzone przez GitHub
commit 88921ace19
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -5,6 +5,8 @@ import { useClientID, useUser, useRouter } from "../../hooks";
import { MIXPANEL_EVENTS, MIXPANEL_PROPS } from "./constants";
import UIContext from "../UIProvider/context";
const TELEMETRY_SCHEMA_VERSION = 1.0;
const AnalyticsProvider = ({ children }) => {
const clientID = useClientID();
const analytics = process.env.NEXT_PUBLIC_MIXPANEL_TOKEN;
@ -138,7 +140,7 @@ const AnalyticsProvider = ({ children }) => {
loaded: () => {
setIsLoaded(true);
mixpanel.identify(clientID);
mixpanel.register({ schema_version: 1.0 });
mixpanel.register({ schema_version: TELEMETRY_SCHEMA_VERSION });
},
});
} catch (error) {