What Facebook SDK v19 attaches to your app events, and how to turn it off
Last updated November 17, 2026
What is attached
Starting with Facebook SDK v19, the native SDK adds context to every app event you log. It is on by default, and it is independent of AutoLogAppEventsEnabled.
- Screen title. The title of the screen the event was logged on.
- Inbound URL. The URL that most recently opened the app, with its query string. Meta calls this the "AppLink URL", but it is not limited to App Links. It is any URL that launches or resumes the app: custom-scheme deep links, and OAuth or magic-link callbacks that carry codes or tokens.
- Outbound URL, iOS only. The last URL the app itself opened, in any scheme, for example through
url_launcher.
The inbound URL is the one to look at. If your login flow returns through a deep link, that link and its parameters are what the SDK holds on to.
Where it is stored, and when it leaves the device
Both URLs are stored on the device, in UserDefaults on iOS and SharedPreferences on Android. They persist across launches until a newer URL overwrites them.
They leave the device only attached to logged events. No event, no upload. But the next event you log carries whatever URL is stored at that moment.
On Android, deferring initialization does not defer this
On iOS the collection is installed as part of SDK initialization. If you defer initialization until consent, it is held off too.
On Android it is not. Inbound URL capture is set up when the SDK loads at process start, and that still happens with com.facebook.sdk.AutoInitEnabled set to false. Inbound URLs are written to disk before your consent flow has run. The Android capture checks only the manifest key below, not the setting in Events Manager.
Turning it off
Set the SDK's own configuration key to false:
<!-- ios/Runner/Info.plist -->
<key>FBSDKAutoLogMetaDataEnabled</key>
<false/><!-- android/app/src/main/AndroidManifest.xml, under <application> -->
<meta-data android:name="com.facebook.sdk.AutoLogMetaDataEnabled" android:value="false"/>You can also turn off "Automatically include more app event details" in Events Manager. That stops the data from being used. It does not stop the on-device capture on Android described above, so do not rely on it alone.
Turning it on after consent
A static key cannot change after the user agrees. For that, call setAutoLogMetaDataEnabled from Dart. The value is persisted across launches and takes precedence over the manifest or Info.plist key.
// Native key set to false, so nothing is captured before consent.
await facebookAppEvents.initializeSdk();
await facebookAppEvents.setAutoLogMetaDataEnabled(true);Turning it on takes effect without a relaunch, though not instantly. Android reads the flag on the next activity start or resume. iOS installs the collectors once the SDK has fetched its settings from Meta.
Turning it off also clears the URLs the SDK has already stored on the device. On iOS, call it after initializeSdk(), like the other settings.
One more key that arrived with v19
SDK v19 also adds AutoLogProductImprovementEnabled, for diagnostic data. Meta states the SDK does not collect or send this data yet. The key only lets you opt out ahead of time. The plugin does not expose it in Dart, so set it natively: FBSDKAutoLogProductImprovementEnabled in Info.plist, and com.facebook.sdk.AutoLogProductImprovementEnabled in the Android manifest.
Verify your setup
- You know which URLs open your app, and whether any of them carry codes or tokens
- FBSDKAutoLogMetaDataEnabled in Info.plist and com.facebook.sdk.AutoLogMetaDataEnabled in AndroidManifest.xml are set the way your privacy policy describes
- On Android, the manifest key is false if nothing may be stored before consent, even when initialization is deferred
- setAutoLogMetaDataEnabled(true) is called only after consent, and after initializeSdk() on iOS
- You do not rely on the Events Manager setting alone to stop collection on the device
Meta's reference documentation
Plugin API reference
Still stuck?
It is a plugin defect
If the plugin is doing something the native Facebook SDK does not, that is our bug. Open an issue and we fix it. Free, always, no conditions.
Open a GitHub issueIt is a usage question
Configuration and integration questions are best asked where other developers can find the answer later.
Ask on StackOverflowYour numbers are wrong and money is moving
If Meta install campaigns are spending and the attribution does not add up, that is a different problem from a broken build. It starts with a free 20 minute call. The one hour diagnostic, 300 USD and credited against the audit, follows if it is worth it.
See the diagnostic and audit