Mixpanel Community Icon

Troubleshooting Mixpanel SDK Integration in React Native 0.70

·
·

i am using react native 0.70 and i integrate mixpanel SDK. now I am trying to connect data in setup guide. but still did not track any event or user . please help here is steps I followed : step1: const mixpanel = new Mixpanel(MIXPANEL_TOKEN,trackAutomaticEvents); step2: const _on_mixpanel_Init = async () => { try { await mixpanel.init(); mixpanel.setLoggingEnabled(true); mixpanel.track("App launched"); mixpanel.track('Button Click', { button_id: '123' }) mixpanel.flush() } catch (error) { console.log(":rocket: ~ _on_mixpanel_Init ~ error:", error); } } step3: useEffect(() => { _on_mixpanel_Init() }, []);

  • Avatar of Athar, M.
    Athar, M.
    ·
    ·

    Fix for this issue was .flush()

  • Avatar of Thena
    Thena
    APP
    ·
    ·

    Hey Abdul! Julianne from Mixpanel Support here. Just wanted to follow up and make sure you were able to get events tracking as expected. It's hard to say what might be happening from the code provided. I see that you have debug mode enabled in the code. Are there any errors logged when you try to trigger the events? If not, can you reach out directly to Support via our webform? When you submit a ticket, it would be helpful if you included the full payload being generated and sent, along with a link to the project. This will help us troubleshoot the specific behavior that you're seeing.