> ## 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

> Opt out of data tracking and enable or disable the MoEngage Cordova 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, opt out of data tracking. The SDK rejects all events and user attributes until you opt back in. Data tracking is enabled by default.

```javascript JavaScript theme={null}
var moe = MoECordova.init(YOUR_WORKSPACE_ID);
moe.optOutDataTracking(true);  // Stop tracking events and user attributes
moe.optOutDataTracking(false); // Resume tracking events and user attributes
```

## 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}
var moe = MoECordova.init(YOUR_WORKSPACE_ID);
moe.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}
var moe = MoECordova.init(YOUR_WORKSPACE_ID);
moe.enableSdk();
```

## Delete User Data

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


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