@capgo/capacitor-facebook-analytics
Log Meta/Facebook App Events, purchases, value-bearing standard events, and advertiser tracking status from Capacitor.
Overview
Section titled “Overview”@capgo/capacitor-facebook-analytics wraps Meta App Events for Capacitor apps on iOS and Android.
Use it to log standard Facebook events, custom events, purchases, and value-bearing events with currency metadata. It also exposes advertiser tracking controls for Android and legacy iOS, while reporting App Tracking Transparency authorization on iOS 17 and above.
Core Capabilities
Section titled “Core Capabilities”initAppEvents- Activate Facebook App Events manually when automatic app event logging is disabled.logEvent- Log standard or custom App Events with optional parameters, value, and currency.logPurchase- Log purchase events with amount, currency, and optional parameters.enableAdvertiserTracking- Enable advertiser ID collection where the native SDK still supports explicit toggling.disableAdvertiserTracking- Disable advertiser ID collection where the native SDK still supports explicit toggling.getAdvertiserTrackingStatus- Read the current advertiser tracking status.
Platform Support
Section titled “Platform Support”| Platform | Support |
|---|---|
| iOS | Supported |
| Android | Supported |
| Web | Unsupported stub |
Public API
Section titled “Public API”| Method | Description |
|---|---|
initAppEvents | Activate Facebook App Events. |
logEvent | Log a Facebook App Event. |
logPurchase | Log a Facebook purchase event. |
enableAdvertiserTracking | Enable advertiser tracking. |
disableAdvertiserTracking | Disable advertiser tracking. |
getAdvertiserTrackingStatus | Get the current advertiser tracking status. |
getPluginVersion | Return the native plugin version marker. |
Source Of Truth
Section titled “Source Of Truth”This reference is synced from src/definitions.ts in capacitor-facebook-analytics.