mixpanel / mixpanel-react-native

Official React Native Tracking Library for Mixpanel Analytics
https://mixpanel.com
Apache License 2.0
105 stars 44 forks source link

add api: setFlushBatchSize #219

Closed zihejia closed 9 months ago

zihejia commented 9 months ago

add a new api

    /**
     * Set the number of events sent in a single network request to the Mixpanel server.
     * By configuring this value, you can optimize network usage and manage the frequency of communication between the client and the server. The maximum size is 50; any value over 50 will default to 50.
     *
     * @param {integer} flushBatchSize whether to automatically send the client IP Address.
     * Defaults to true.
     *
     */
    setFlushBatchSize(flushBatchSize) {
        MixpanelReactNative.setFlushBatchSize(this.token, flushBatchSize);
    }