evollu / react-native-firebase-analytics

React native bridge for firebase analytics
MIT License
206 stars 54 forks source link

Add or document way of disabling for debug builds #19

Closed greenatwork closed 7 years ago

greenatwork commented 7 years ago

It would be great if there was a way to only enable this module in production builds. Whether the best course of action is to include something in the module, or provide an example of how to go about it in the documentation, I don't know.

Dean177 commented 7 years ago

From the Readme:

const Analytics = require('react-native-firebase-analytics');

if (environment === 'staging') {
    Analytics.setEnabled(false);
}
greena13 commented 7 years ago

Fiddlesticks. I thought I had seen it somewhere, but couldn't find it when I actually needed it.

I would argue that it could have its own heading to make it easier to find. Otherwise I am happy for this to be closed as an invalid issue.

Thanks for your pointing it out @Dean117.

Dean177 commented 7 years ago

Happy to help

On 10 Aug 2016 5:31 p.m., "Aleck Greenham" notifications@github.com wrote:

Fiddlesticks. I thought I had seen it somewhere, but couldn't find it when I actually needed it.

I would argue that it could have its own heading to make it easier to find. Otherwise I am happy for this to be closed as an invalid issue.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/evollu/react-native-firebase-analytics/issues/19#issuecomment-238923817, or mute the thread https://github.com/notifications/unsubscribe-auth/AEYKrugZO23QDrEjd7pmVPUexyYffuW2ks5qefz0gaJpZM4Jf6Os .

sibelius commented 7 years ago

@greenatwork can u close this issue?