SDK opt-out (e.g. GDPR)
If you plan to send personal user data and have to comply with EU's GDPR, any other data privacy law or simply want to give your users more control regarding their privacy, these methods will help you plug your consent screen to Batch.
There are two SDK operation modes:
SDK enabled by default, opting-out required via an explicit method call: this is the default mode.
SDK disabled by default, opting-in required
Opting-out
In order to opt-out from SDK, simply call:
Opting out will:
Prevent
[BatchSDK startWithAPIKey:]
from starting the SDKDisable any network capability from the SDK
Disable all In-App campaigns
Make the Inbox module return an error immediately
Make any call to
-[BatchProfileEditor save]
do nothingMake any "tracking" methods from BatchProfile ineffective
Even if you opt-in afterwards, data generated (such as user data or tracked events) while opted out WILL be lost.
You can also wipe the SDK installation data:
This will wipe the data locally and request a remote data removal for the matching Installation ID and its associated data. Any user-level data associated with the Custom User ID (if any) set via our server APIs will not be deleted. However, the Installation ID <> Custom User ID association will be, effectively logging the user out before deleting their installation data. Sending notifications to this user using their Advertising ID (via the Transactional API or a Custom Audience) will not be possible for a month.
Disabling the SDK by default
In order to disable the SDK by default, you need to add a key called BATCH_OPTED_OUT_BY_DEFAULT
with a true
boolean value to your Info.plist.
Opting-in
Once you've opted-out (either programatically, or by default), you can re-enable the SDK by calling the following:
What are the impacts of disabling the SDK?
Disabling Batch SDK by default
You can disable Batch SDK by default and start it when you need it, later in the user journey. This is helpful if you are using a Consent Management Platform (CMP) and don't want to start collecting data before obtaining your users' consent.
Batch will only detect in the analytics and be able to contact users who started the SDK once. The rest of your users won't be detected by Batch. You won't be able to reach them using push notifications or In-App messages.
Allowing users to disable Batch SDK in your app settings
If you want to give your users more control regarding their privacy, you can give them the option to disable Batch SDK in the app settings.
A) Disabling the SDK
Batch SDK will not start anymore. Here are the impacts of the SDK deactivation:
Analytics: Your users will no longer be detected by Batch when they open the app or open a notification.
Data collection: Batch will stop collecting native and custom data for these installs.
Push notifications: iOS users opt-in to push notifications will keep receiving alerts because they are displayed directly by the OS and their push token remains valid even after Batch SDK opt-out. They will need to disable push notifications manually from iOS system settings if they want to stop receiving alerts. On Android, Batch SDK receiver is in charge of receiving and displaying push notifications. Disabling Batch SDK will also disable push notifications.
In-App messaging: Your users won't see any In-App messages. In-App messages are displayed by Batch SDK.
Inbox: The content of your notification centre won't be updated if you rely on Batch Inbox.
If users re-enable Batch SDK later from your app settings, analytics, data collection, push notifications, In-App messages and the Inbox feature will work again.
B) Disabling the SDK and wiping the data
In addition to disabling the SDK, you can also send a request to delete the data attached to the installation. This will wipe the data locally and request a remote data removal for the matching Installation ID. You should only use that method if you are fully aware of the impacts on your users.
Batch will blacklist the advertising ID attached to the installation for one month following the data removal.
Last updated
Was this helpful?