Compare commits

...

1 Commits

Author SHA1 Message Date
openhands 18d9acfc86 Fix issue #4939: Move PostHog client key to config.json 2024-11-12 17:36:25 +00:00
2 changed files with 10 additions and 5 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
{
"APP_MODE": "oss",
"GITHUB_CLIENT_ID": ""
"GITHUB_CLIENT_ID": "",
"POSTHOG_CLIENT_KEY": "phc_3ESMmY9SgqEAGBB6sMGK5ayYHkeUuknH2vP6FmWH9RA"
}
+8 -4
View File
@@ -15,10 +15,14 @@ import store from "./store";
function PosthogInit() {
React.useEffect(() => {
posthog.init("phc_3ESMmY9SgqEAGBB6sMGK5ayYHkeUuknH2vP6FmWH9RA", {
api_host: "https://us.i.posthog.com",
person_profiles: "identified_only",
});
fetch("/config.json")
.then((response) => response.json())
.then((config) => {
posthog.init(config.POSTHOG_CLIENT_KEY, {
api_host: "https://us.i.posthog.com",
person_profiles: "identified_only",
});
});
}, []);
return null;