App Events

Facebook SDK Best Practices for GDPR Compliance

Updated: Nov 2, 2026
Copy for LLM
After you integrate Facebook SDK, certain App Events are automatically logged and collected for Events Manager⁠, unless you disable Automatic App Event Logging. You may change this in your app code or through a toggle in Events Manager or App Dashboard. Please note that if either the AutoLogAppEventsEnabled flag or the toggle is set to disable, automatic event logging will be disabled. For details about what information is collected and how to disable Automatic App Event Logging, see Automatic App Event Logging⁠.
When you use the FB SDK for App Events, our business terms require that you have an appropriate legal basis to collect and process User information. Under GDPR and other EU data protection regulations, you are required to obtain end User consent before sending data via our SDK. Thus, you need to ensure that your SDK implementation meets these consent requirements.
The SDK by default automatically logs common mobile events from your app like app installs and app launches. These events are transmitted to Facebook when an app is opened to provide you insights into your app’s User behavior and ad campaign performance.
To help you implement consent mechanisms to meet the legal obligations under EU data protection law and our Business Tools Terms, we offer the following resources.
You can review our consent guide for practical guidance and best practices on asking for consent on your websites and apps. If you choose to obtain a User’s informed consent prior to the app install via a separate User registration flow, as noted in the above consent guide, you will not need to make any changes to continue using the Facebook SDK and its auto-logging feature.

Delaying Automatic Event Collection

You may need to collect user consent before transmitting data using the SDK. We provide tools to delay the transmission of data from the SDK until the user has had the opportunity to go through an in-app consent flow.
To do this, set the AutoLogAppEventsEnabled flag to false. Once the user has provided consent, reenable the feature in code. Instructions are available for Android, iOS, and Unity.

Disabling Automatic Event Collection

You can disable Automatic App Event Logging in Events Manager under dataset settings or by setting the AutoLogAppEventsEnabled flag to false. Instructions are available for Android, iOS, and Unity. If this feature is disabled, your app will no longer track app install or launch events unless you manually log these events.
Note: If you’ve turned off automatic event logging in Events Manager, the feature will be disabled even if you enable it in code.

Disabling Additional App Details Included With Automatically Logged Events

Facebook SDK will identify and send app metadata, like app links and screen titles, that are most likely to improve ad performance. These will be included with automatically logged events by default.
You can disable additional event details by setting com.facebook.sdk.AutoLogMetaDataEnabled (Android) or FBSDKAutoLogMetaDataEnabled (iOS) to false in your app or by turning it off in Events Manager under dataset settings. If either of these toggles is disabled, this feature will be off. Instructions are available for Android, iOS, and Unity.

Disabling Automatic SDK Initialization

The Facebook SDK for Android automatically initializes when the app is opened. When the SDK is initializing, it fetches app settings from Facebook. If you want to block all network requests to Facebook, you can disable automatic initialization.

Android

Set the AutoInitEnabled flag to false in your AndroidManifest.xml file.
<application>
  ...
  <meta-data android:name="com.facebook.sdk.AutoInitEnabled"
           android:value="false"/>
  ...
</application>
Then, re-enable automatic initialization after an end User provides consent by calling the setAutoInitEnabled() method of the FacebookSdk class and setting it to true.
FacebookSdk.setAutoInitEnabled(true);
FacebookSdk.fullyInitialize();