Open Nazkab10 opened 1 month ago
We aren't able to capture recordings for some users, but for others we do. It seems extremely random and we're not sure why.
Hey, how do you know you're not capturing?
You do have min duration set to 10 seconds... Could it be that?
nope, I've seen users interact with the app for longer than 10 and it still won't appear. My friend onboarded, but nothing was captured by posthog. Whereas posthog always catches what I'm doing
Here is the main.jsx file for reference
import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { ChakraProvider, extendTheme } from "@chakra-ui/react";
import { BrowserRouter } from "react-router-dom";
import App from "./App.jsx";
import { PostHogProvider } from "posthog-js/react";
import "./index.css";
const options = {
api_host: import.meta.env.VITE_POSTHOG_HOST,
};
const styles = {
global: {
body: {
bg: "#121212",
},
},
};
const config = {
initialColorMode: "dark",
useSystemColorMode: false,
};
const theme = extendTheme({ config, styles });
createRoot(document.getElementById("root")).render(
<StrictMode>
<PostHogProvider
apiKey={import.meta.env.VITE_POSTHOG_KEY}
options={options}
>
<ChakraProvider theme={theme}>
<BrowserRouter>
<App />
</BrowserRouter>
</ChakraProvider>
</PostHogProvider>
</StrictMode>
);
Also, nice to meet you. Always great to meet a fellow manc lol
I'll assume you've ruled out things like the key sometimes not being present in the environment because you're seeing events (but mention it for completeness since I've seen computers disappoint us all so many times 🤣 )
Are you using a reverse proxy? Am wondering if sometimes the recorder script doesn't load or the traffic is too large to get through 🤔
It's really tricky to debug absence... do you have other tools that might capture console logs or errors that would help diagnose?
(sorry to be vague...)
Bug Description
Bug description
We aren't able to capture recordings for some users, but for others we do. It seems extremely random and we're not sure why. When I tried to troubleshoot and type window.posthog.LIB_VERSION in the console it returned undefined, which is strange because it was recording for me. I also updated my package to the latest available one as per the instructions on posthog. The fact that it is at least recording suggests that it is set up correctly, but I'm still confused as to why it would return undefined in the console. Thanks!
The link to the site is alorapodcasts.com.
How to reproduce
Additional context
Debug info