Repository navigation
docs(appevents): app opens need automatic logging - #7
Merged
Merged
Conversation
facebook-core 19.0.0 logs fb_mobile_activate_app and the deactivation event through InternalAppEventsLogger.logEvent, which returns early while FacebookSdk.getAutoLogAppEventsEnabled() is false. ActivateApp() with automatic logging off therefore sends only the install ping. Document the supported recipe (enable automatic logging after consent, turn automatic purchase logging off on the App Dashboard Android card when a server reports purchases), that the flag persists across launches, that the effective value also needs Events Manager not to disable it, and that turning it off stops automatic events at once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The sample kept automatic logging off and relied on ActivateApp() for app opens, which the bundled SDK does not log in that mode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The docs said that
ActivateApp()with automatic logging off still logs app opens. It does not with the bundled facebook-core 19.0.0. A runtime check showed only the install ping and nofb_mobile_activate_app, and the bytecode confirms it.Bytecode evidence (javap on the pinned
facebook-core-19.0.0.aar, SHA-25622782e58…2dcab):SessionLogger.logActivateApp/logDeactivateApplog throughInternalAppEventsLogger.logEvent(String, Bundle)/logEvent(String, double, Bundle).FacebookSdk.getAutoLogAppEventsEnabled()followed byifeq→return. Automatic events are dropped while the flag is off, even whenActivateApp()started tracking.AppEventsLoggerImpl.activateAppcallspublishInstallAsyncand thenActivityLifecycleTracker.startTracking. The install ping does not depend on the flag. No other class callspublishInstallAsync, so automatic logging alone never sends the install ping.UserSettingsManager.checkAutoLogAppEventsEnabledreturns the local value AND the cached server valueauto_log_app_events_enabled. A localfalsealways wins, and a server-side disable overrides a localtrue.FacebookSdk.setAutoLogAppEventsEnabledwrites the value to SharedPreferences, where it persists, and starts tracking when the value istrue.AutomaticAnalyticsLogger.isImplicitPurchaseLoggingEnabledrequires both automatic logging and the dashboard IAP setting.Changes
Docs/Integration.md:SetAutoLogAppEventsEnabled(true)plusActivateApp()after consent, with automatic in-app purchase and subscription logging turned off on the App Dashboard Android card when a server reports purchases;FacebookAppEvents.csXML docs: the class remarks,SetAutoLogAppEventsEnabledandActivateApp, corrected the same way.GrantConsentenables automatic logging, and the README is updated to match.No API or package content change. The nuget readme carries no such claim. The XML docs ship in the package, so the next release will carry the fix.
🤖 Generated with Claude Code