Skip to content

docs(appevents): app opens need automatic logging - #7

Merged
Kapusch merged 2 commits into
masterfrom
docs/activate-app-auto-logging
Oct 28, 2026
Merged

Kapusch merged 2 commits into
masterfrom
docs/activate-app-auto-logging

Conversation

@Kapusch

@Kapusch Kapusch commented Oct 28, 2026

Copy link
Copy Markdown
Owner

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 no fb_mobile_activate_app, and the bytecode confirms it.

Bytecode evidence (javap on the pinned facebook-core-19.0.0.aar, SHA-256 22782e58…2dcab):

  • SessionLogger.logActivateApp / logDeactivateApp log through InternalAppEventsLogger.logEvent(String, Bundle) / logEvent(String, double, Bundle).
  • Both methods start with FacebookSdk.getAutoLogAppEventsEnabled() followed by ifeq → return. Automatic events are dropped while the flag is off, even when ActivateApp() started tracking.
  • AppEventsLoggerImpl.activateApp calls publishInstallAsync and then ActivityLifecycleTracker.startTracking. The install ping does not depend on the flag. No other class calls publishInstallAsync, so automatic logging alone never sends the install ping.
  • UserSettingsManager.checkAutoLogAppEventsEnabled returns the local value AND the cached server value auto_log_app_events_enabled. A local false always wins, and a server-side disable overrides a local true.
  • FacebookSdk.setAutoLogAppEventsEnabled writes the value to SharedPreferences, where it persists, and starts tracking when the value is true.
  • AutomaticAnalyticsLogger.isImplicitPurchaseLoggingEnabled requires both automatic logging and the dashboard IAP setting.

Changes

  • Docs/Integration.md:
    • corrects the manifest switch row;
    • documents the supported recipe: SetAutoLogAppEventsEnabled(true) plus ActivateApp() after consent, with automatic in-app purchase and subscription logging turned off on the App Dashboard Android card when a server reports purchases;
    • notes that the flag persists across launches and that Events Manager must not disable automatic SDK logging;
    • corrects the withdrawal note: turning the flag off stops automatic events at once, while tracking and flushing continue;
    • corrects the double-counting section.
  • FacebookAppEvents.cs XML docs: the class remarks, SetAutoLogAppEventsEnabled and ActivateApp, corrected the same way.
  • Sample: GrantConsent enables 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

Kapusch and others added 2 commits October 28, 2026 12:42
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>
@Kapusch
Kapusch merged commit 36428fb into master Oct 28, 2026
1 check passed
@Kapusch
Kapusch deleted the docs/activate-app-auto-logging branch October 28, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant