[For Android Google Analytics v4]
Is there a way for specific activities to not be reported (Sending hit to service) when ga_autoActivityTracking = true?
I was thinking of turning ga_autoActivityTracking false at onStart() and true again at onStop() in the specific activities. If that possible would someone be as kind as in providing a sample code. Other approaches are also most welcome.
Thank you.
When using autoActivityTracking you can not exclude some Activities from the report unfortunately. The only way to do that is to disable automatic activity tracking and manually send screen view from Activity.onStart():
tracker.setScreenName("screen name");
tracker.send(new HitBuilders.ScreenViewBuilder().build());
You can not turn off auto activity tracking from onStart() as the callback list is captured by Android before the callbacks are made. Any change in the list will not affect the list of registered callback for this onStart(). Unfortunately disabling the auto activity tracking from onStart will not work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With