analytics-react-native icon indicating copy to clipboard operation
analytics-react-native copied to clipboard

[analytics-react-native-advertising-id-plugin] [Android]: events not being sent when adTrackingEnabled is false

Open ignaciomendeznole opened this issue 1 year ago • 1 comments

Follow up on this issue: https://github.com/segmentio/analytics-react-native/issues/995

  • analytics-react-native version: 2.20.2
  • analytics-react-native-advertising-id-plugin version: 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

ignaciomendeznole avatar Oct 28 '24 11:10 ignaciomendeznole

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 avatar Feb 07 '25 13:02 charleyoliveira

Follow up on this issue: #995

  • analytics-react-native version: 2.20.2
  • analytics-react-native-advertising-id-plugin version: 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

This issue has been fixed in version 1.3.3 of analytics-react-native-advertising-id-plugin

sunitaprajapati89 avatar Apr 10 '25 04:04 sunitaprajapati89

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!

sunitaprajapati89 avatar Apr 10 '25 05:04 sunitaprajapati89