It would be really simple to add a method for this:
Then we could disable Analytics in JS land using setAnalyticsCollectionEnabled