# How to integrate Batch into my CMP?

Consent management platforms allow website or mobile application publishers to easily set up an interface for collecting user consent.

You can integrate Batch into any CMP. Here is how you can do it:

## Technical integration <a href="#h_4fb70c3979" id="h_4fb70c3979"></a>

### Mobile (iOS / Android) <a href="#h_11743b66b5" id="h_11743b66b5"></a>

On mobile, you can disable the SDK by default and start collecting data only after users give consent:

1. Set the **BATCH\_OPTED\_OUT\_BY\_DEFAULT** property as "true" to disable Batch by default: [iOS](https://app.gitbook.com/s/CL8wF0y1T2vLnm3yR2MW/sdk/ios/data-privacy/opt-out#disabling-the-sdk-by-default) / [Android](https://app.gitbook.com/s/CL8wF0y1T2vLnm3yR2MW/sdk/android/data-privacy/opt-out#disabling-the-sdk-by-default)
2. Use the **optIn** method to enable Batch SDK once consent has been given: [iOS](https://app.gitbook.com/s/CL8wF0y1T2vLnm3yR2MW/sdk/ios/data-privacy/opt-out#opting-in) / [Android](https://app.gitbook.com/s/CL8wF0y1T2vLnm3yR2MW/sdk/android/data-privacy/opt-out#opting-in)
3. Use the **optOut** method if the consent is removed (from the app settings, for example): [iOS](https://app.gitbook.com/s/CL8wF0y1T2vLnm3yR2MW/sdk/ios/data-privacy/opt-out#opting-out) / [Android](https://app.gitbook.com/s/CL8wF0y1T2vLnm3yR2MW/sdk/android/data-privacy/opt-out#opting-out)

### Web <a href="#h_119a060ddd" id="h_119a060ddd"></a>

For web push, data collection is triggered with the execution of Batch's JavaScript tag.

You can choose the trigger that will load the JavaScript tag. For example, you can trigger it when consent is provided via the CMP.

Here are more details on triggers for [Google Tag Manager](https://support.google.com/tagmanager/answer/7679316?hl=en) and [TagCommander](https://community.commandersact.com/tagcommander/user-manual/container-management/rules/triggers).

You also need to call `batchSDK('unsubscribe')` for users who revoke their consent after having opted in to push notifications. This will ensure these users are unsubscribed from push notifications.

## Managing purposes <a href="#h_cae6c44f21" id="h_cae6c44f21"></a>

Most CMPs allow you to customize the purposes for which you collect consent. Here are examples in [Didomi's](https://support.didomi.io/customize-the-purposes-for-which-i-collect-consent) and [Usercentrics' documentation](https://docs.usercentrics.com/cmp_in_app_sdk/latest/collect_consent/config_cmp/#service-settings).

Your legal team can help you determine these purposes and how to handle these treatments in your specific case.\
​

This guide summarizes all the data processed by Batch, as well as all the actionable features at your disposal to comply with GDPR: [GDPR Compliance](https://doc.batch.com/guides-and-best-practices/privacy-and-gdpr/gdpr-compliance).
