> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Compliance

> Enable or disable data tracking and the MoEngage React Native SDK from the JavaScript layer.

Use the APIs below to control what the MoEngage SDK tracks, based on the consent a user has given.

## Enable or Disable Data Tracking

To stop the SDK from tracking custom events and user attributes, call `disableDataTracking()`.

```javascript JavaScript theme={null}
import ReactMoE from 'react-native-moengage';
ReactMoE.disableDataTracking();
```

The SDK rejects all events and user attributes until you call `enableDataTracking()`. Data tracking is enabled by default.

```javascript JavaScript theme={null}
import ReactMoE from 'react-native-moengage';
ReactMoE.enableDataTracking();
```

## Enable or Disable the SDK

To stop the SDK from tracking any user information or sending any data to MoEngage, call `disableSdk()`.

```javascript JavaScript theme={null}
import ReactMoE from 'react-native-moengage';
ReactMoE.disableSdk();
```

All SDK APIs are non-operational until you call `enableSdk()`. The SDK is enabled by default, so call `enableSdk()` only if you disabled it earlier.

```javascript JavaScript theme={null}
import ReactMoE from 'react-native-moengage';
ReactMoE.enableSdk();
```

## Delete User Data

To delete the current user's profile from the MoEngage server, refer to [Delete User From MoEngage Server](https://moengage.com/docs/developer-guide/react-native-sdk/data-tracking/delete-user-from-moengage-server.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.