PostHog / posthog-flutter

PostHog Flutter SDK
https://posthog.com/docs/libraries/flutter
MIT License
55 stars 37 forks source link

How to implement Groups Analytics with Flutter? #47

Closed purbojati closed 1 year ago

purbojati commented 1 year ago

There is no Flutter guideline in Posthog documentation.

marandaneto commented 1 year ago

@purbojati only docs (code snippets) are missing apparently, but it's very similar to the other SDKs, you can check the source code here.

ahmadadzan commented 1 year ago

I was trying this all day long and the groups still not coming into Groups Tab. What's wrong? Please help. Thanks!

sendEnvent(String eventName, [Map<String, dynamic>? properties]) { properties ??= {}; properties['platform'] = Platform.isAndroid ? "android" : "ios"; Posthog().group( groupType: 'Bisnis', groupKey: global.bussinessId, groupProperties: {'nama': 'cobacoba'}); Posthog().capture(eventName: eventName, properties: properties); }

marandaneto commented 1 year ago

@ahmadadzan Can you check if your SDK init. is correct? docs is here.

Try to enable the Posthog().debug(true) flag and copy-paste the logs, so we can check what's going on.

Are you testing on Android or iOS?

Is the Posthog().capture(...) event at least appearing on PostHog dashboards?

marandaneto commented 1 year ago

@purbojati any feedback?

purbojati commented 1 year ago

@marandaneto No, unfortunately :( We are still using Posthog for event tracking, just that not Group analytics.

marandaneto commented 1 year ago

Ok, since I mentioned this is already possible, let me know if you find any issues.