updating posthog script

This commit is contained in:
wil committed 2024-10-29 15:08:03 -04:00
1 parent 53e73a0ec8
commit a379affda2
1 file changed
+13 -10
+13 -10
View File
@@ -9,20 +9,23 @@ import { PostHogProvider } from "posthog-js/react";
import "./global.css";
import { useRenderCounter } from "~/hooks/useRenderCounter";
// function PostHogInit() {
// const apiKey = "phc_jBFgac0mVALAFk3negnSfYCcHgvkT00yBLQDmCDYNBb";
// posthog.init(apiKey, {
// api_host: "https://us.i.posthog.com/",
// ui_host: "https://us.i.posthog.com/",
// });
// }
function PostHogInit() {
const apiKey = "phc_jBFgac0mVALAFk3negnSfYCcHgvkT00yBLQDmCDYNBb";
posthog.init(apiKey, {
api_host: "https://us.i.posthog.com/",
ui_host: "https://us.i.posthog.com/",
});
}
const App = () => {
const useStrictMode = false;
useRenderCounter("App");
// useEffect(() => {
// PostHogInit();
// }, []);
useEffect(() => {
if (import.meta.env.DEV) {
return;
}
PostHogInit();
}, []);
if (useStrictMode) {
return (
<StrictMode>