Skip to main content

Mobile App Consent Management

DataGrail provides native SDKs for iOS, Android, and React Native so you can manage consent in your mobile apps. The SDKs use the same consent configuration you publish for your website, so your categories and banner content stay consistent everywhere.

The mobile SDKs let your app:

  • Display a consent banner built from your published DataGrail configuration
  • Save user preferences on the device and sync them to DataGrail
  • Check consent by category before you start analytics or advertising SDKs
  • React to consent changes when a user updates their preferences
  • Keep working offline by queuing failed requests and retrying them later
  • Share consent across devices with Universal Consent

Available SDKs​

Each SDK is open source on GitHub. The repository README is the source of truth for installation, requirements, the full API reference, and a demo app.

PlatformRepositoryPackage
iOSdatagrail/consent-iosCocoaPods (DataGrailConsent) or Swift Package Manager
Androiddatagrail/consent-androidMaven Central (io.datagrail:consent)
React Nativedatagrail/consent-reactnpm (@datagrail.io/react-native-consent)
Stay Up To Date

Watch the repository on GitHub to get notified about new releases. Each repository's releases page lists changes and upgrade notes.

Getting Started​

Each SDK loads your consent configuration from a Config URL. Follow these steps to find the Config URL for a container:

  1. Navigate to Consent Management, Settings, Containers, and select the container you want your app to use.
  2. Under Publishing Details, turn on the Show Config URL toggle.
  3. Copy the Config URL that appears in the container details.
  4. Publish the container so the latest configuration is available at that URL.

Next, follow the installation and quick start steps in the README for your platform. The general flow is the same on every platform:

StepWhat It Does
InitializeStart the SDK early in your app's lifecycle with your Config URL
Check consentAsk the SDK whether the user still needs to make a choice
Show the bannerDisplay the consent banner when consent is needed
Gate trackingCheck whether a category is enabled before you start the SDKs in that category
Listen for changesUpdate your tracking setup when the user changes their preferences

 

Need help?
If you have any questions, please reach out to your dedicated Account Manager or contact us at support@datagrail.io.

Disclaimer: The information contained in this message does not constitute as legal advice. We would advise seeking professional counsel before acting on or interpreting any material.