cmackay / google-analytics-plugin

Cordova Google Analytics Plugin for Android & iOS
Apache License 2.0
89 stars 43 forks source link

Add App-level Opt Out #46

Closed petarov closed 9 years ago

petarov commented 9 years ago

This PR adds application level opt out for iOS and Android.

Examples:

navigator.analytics.setAppOptOut(true, function() {
  // success
});
navigator.analytics.getAppOptOut(function (result) {
});

I've tested this on both platforms. Real-Time views in GA should be 0 when opt out is set to true. It might require another look on iOS. Objective-C is not my thing. ;)

cmackay commented 9 years ago

Thanks @petarov ! I have briefly reviewed the PR and everything looks great. I appreciate you adding this feature to the plugin. I will check it out in more more detail and hopefully get a new release published later today. Thanks!

-Craig

cmackay commented 9 years ago

I tested out opt out on iPhone and Android and everything seems to work great. The changes have been published to npm v0.1.17. Thanks @petarov!

petarov commented 9 years ago

Thank you for the fast response! :beer: