PostHog / posthog-js-lite

Reimplementation of posthog-js to be as light and modular as possible.
https://posthog.com/docs/libraries
MIT License
70 stars 36 forks source link

iOS device info missing #201

Closed FabianTrain closed 8 months ago

FabianTrain commented 8 months ago

Bug description

I added PostHog to my react-native project using PostHogProvider. After one week of data collection it looks like autocapture does not detect the iOS device info (check screenshot below). Android and other events are captured correctly.

<PostHogProvider
      apiKey={Config.POSTHOG_API_KEY}
      options={{
         host: 'https://app.posthog.com',
       }}
    autocapture={{}}>
                <AppStack />
</PostHogProvider>
image

How to reproduce

I followed the official installation guide using PostHogProvider and autocapture.

Related sub-libraries

Additional context

"dependencies": {
    "posthog-react-native": "^2.11.4",
    "react": "18.2.0",
    "react-native": "0.73.4",
   ...
  },

Thank you for your bug report – we love squashing them!

marandaneto commented 8 months ago

@FabianTrain Hi, do you receive events from the iOS app or is it just the device info missing? can you share the link to your organization? feel free to open a ticket on our support page or ask here https://posthog.com/questions if you don't feel comfortable sharing it here.

FabianTrain commented 8 months ago

@marandaneto Thank you for the quick response. I can receive all other events from iOS (custom events and autocapture eg. opened screens) Where can I find the organization link ( https://us.posthog.com/project/54091/ ) ?

marandaneto commented 8 months ago

@FabianTrain events 2 weeks ago had this information (SDK v2.11.4). The last events with the SDK v2.11.6, but nothing changed about that. The PostHog SDK uses those libraries to collect device information: if Expo app expo-device, or react-native-device-info, did you remove or upgrade something with those libs in the latest versions?

FabianTrain commented 8 months ago

@marandaneto Thank you for the support. I think I deployed the App to the AppStore without the pods for react-native-device-info.

=> This was the issue. iOS Device type, OS Version ... are now tracked correctly.