Opt-out
When opt-out is enabled, the SDK stops sending all events.
Configuration at Initialization
import { createInstance, HackleProvider } from "@hackler/react-native-sdk";
const config = {
optOutTracking: true
};
const hackleClient = createInstance("YOUR_APP_SDK_KEY", config);
const App = () => {
return (
<HackleProvider hackleClient={hackleClient}>
<YourApp />
</HackleProvider>
);
};Runtime Opt-out Control
Persistence Management
The opt-out state changed at runtime is reset to the value configured in the initialization Config when the app restarts.
To persist the state after an app restart, you must implement your own save and restore logic.
Last updated