mixpanel / mixpanel-android

Official Android Tracking Library for Mixpanel Analytics
http://mixpanel.com/
Apache License 2.0
1.02k stars 366 forks source link

Opt In event still sent when "trackAutomaticEvents" is set to false #836

Open brandenfung2 opened 1 month ago

brandenfung2 commented 1 month ago

We are obtaining the MixpanelAPI instance using the following call:

 MixpanelAPI.getInstance(applicationContext, getToken(), false)

where trackAutomaticEvents is set to false

However we are still seeing automatic events being sent to our console, specifically we are still seeing the $opt_in event.

Upon further investigation in the Mixpanel Android SDK, it appears that MixpanelAPI.optInTracking() will send this event no matter the trackAutomaticEvents flag via this line: https://github.com/mixpanel/mixpanel-android/blob/f40e1f734cf70b59a912e74994e87b088d3788ac/src/main/java/com/mixpanel/android/mpmetrics/MixpanelAPI.java#L1239

Is there a reason why the opt_in event is not classified as an automatic event? This seems like a bug to me.