capacitor-community / firebase-analytics

Enable Firebase Analytics for Capacitor Apps
MIT License
162 stars 64 forks source link

Disable auto tracking screen_view on web, but still allow events #168

Open media4learning opened 1 year ago

media4learning commented 1 year ago

Is your feature request related to a problem? Please describe. I'm using this plugin for an app that is deployed to web, iOS and Android.

For devices (iOS and Android), I can use flags to disable automatic tracking of screen_view and I can still use setScreenName to log screen views manually. For web, I can log an event for screen_view to manually set a screen view, but the automatic tracking still tracks the same view. If I set setCollectionEnabled with enabled set to false, then on web the event logging is also disabled.

Describe the solution you'd like For the web platform, can there be a way to disable automatic screen_view tracking, but keep event logging enabled so we can manually track screen views?

Describe alternatives you've considered I could set up a whole new event called manual_screen_view and use this across platforms I guess, but these events wouldn't;t show up natively in Google Analytics and Firebase Analytics

Additional context The reason for this is to keep there screen name/ url consistent across all platforms, including web.