eclipsesource / tabris-plugin-firebase

A firebase plugin for Tabris.js
https://tabrisjs.com
BSD 3-Clause "New" or "Revised" License
6 stars 5 forks source link

Analytics disabled incorrectly #59

Closed cpetrov closed 5 years ago

cpetrov commented 5 years ago

Problem description

When analyticsCollectionEnabled is set to false, logEvent and setUserProperty are turned into noop: https://github.com/eclipsesource/tabris-plugin-firebase/blob/master/src/ios/src/ESFBAnalytics.m#L63

This doesn't account for e.g. screen tracking when setting screenName.

Expected behavior

To disable analytics collection, following API should be used with the native plugin: https://firebase.google.com/support/guides/disable-analytics#disable_collection_on_ios

This should guarantee that no data is sent in all cases. Plugin API does not need to be noop in this case.