analytics-react-native
analytics-react-native copied to clipboard
[analytics-react-native-advertising-id-plugin] [Android]: events not being sent when adTrackingEnabled is false
Follow up on this issue: https://github.com/segmentio/analytics-react-native/issues/995
analytics-react-nativeversion: 2.20.2analytics-react-native-advertising-id-pluginversion: 1.3.2- React Native version: 0.71.18
- iOS or Android or both: Android
Steps to reproduce
- Turn off advertising ID from Android Privacy settings
- Install the app that uses the plugin
Expected behavior
Application Installed event should be sent without getting enriched with advertisingId
Actual behavior The events are not getting sent at all
If this plugin is configured on iOS, even though the library has platform checking indicating it's only for Android, it still affects iOS and prevents events from being triggered. Therefore, I had to add an additional platform check in my code to only add the plugin when running on Android.
Follow up on this issue: #995
analytics-react-nativeversion: 2.20.2analytics-react-native-advertising-id-pluginversion: 1.3.2- React Native version: 0.71.18
- iOS or Android or both: Android
Steps to reproduce
- Turn off advertising ID from Android Privacy settings
- Install the app that uses the plugin
Expected behavior Application Installed event should be sent without getting enriched with
advertisingIdActual behavior The events are not getting sent at all
This issue has been fixed in version 1.3.3 of analytics-react-native-advertising-id-plugin
If this plugin is configured on iOS, even though the library has platform checking indicating it's only for Android, it still affects iOS and prevents events from being triggered. Therefore, I had to add an additional platform check in my code to only add the plugin when running on Android.
@charleyoliveira : Thanks for highlighting this !
The advertisingId plugin is intended to work on the Android platform only, so it's functioning as expected.
If you're looking to implement similar functionality on iOS, we recommend using the IDFA plugin instead: @segment/analytics-react-native-plugin-idfa.
Let us know if you need any help integrating it!