segmentio / analytics-react-native

The hassle-free way to add analytics to your React-Native app.
https://segment.com/docs/sources/mobile/react-native/
MIT License
367 stars 191 forks source link

Group method doesn't work #1009

Closed minhduc21598 closed 1 month ago

minhduc21598 commented 1 month ago

Hi! I'm facing an issue and I need some helps. I called the group method with groupId (for example: "ABC") before calling any track method, but when I called some track methods after that, they doesn't show the groupId "ABC" in the dashboard. I see the data events in my-jitsu-domain.com. Thanks!

Steps to reproduce I called group method before any track method

Expected behavior My track events must show groupId in the dashboard

Actual behavior There's no groupId in track events

alanjcharles commented 1 month ago

Hi @minhduc21598 this is intended behavior. The groupId does not work in the same way as a userId or anonymousId. If you would like to attach it to all track events you will have to create a simple, custom plugin. Please check out this section of the readme for more information about that. Your implementation will likely be pretty similar to the requestTrackingPermission() method in our idfaPlugin.

I am going to go ahead and close this out since it's not a bug. Please feel free to reach out to friends@segment.com if you have any additional questions or if you run into any other issues with your implementation.

minhduc21598 commented 1 month ago

Hi @minhduc21598 this is intended behavior. The groupId does not work in the same way as a userId or anonymousId. If you would like to attach it to all track events you will have to create a simple, custom plugin. Please check out this section of the readme for more information about that. Your implementation will likely be pretty similar to the requestTrackingPermission() method in our idfaPlugin.

I am going to go ahead and close this out since it's not a bug. Please feel free to reach out to friends@segment.com if you have any additional questions or if you run into any other issues with your implementation.

That works for me! Thank you so much.