mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 17:38:10 +00:00
updating posthog script
This commit is contained in:
1 parent
53e73a0ec8
commit
a379affda2
1 file changed
+13
-10
+13
-10
@@ -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>
|
||||
|
||||
Reference in new issue
Block a user