Skip to main content
Question

How to Call activateApp() for Tracking Facebook App Events in Flutter

  • 27 August 2024
  • 2 replies
  • 33 views

I want to track app installs, but currently, I am not receiving any install information on iOS. I found the this for a solution

 

in revenueCat document: https://www.revenuecat.com/docs/integrations/attribution/facebook-ads#track-install-and-usage-events

 

Track Install and Usage Events

As noted above, you'll need to disable all client side tracking of revenue to prevent double counting of revenue in Facebook Ads Manager. To continue tracking install and usage events, you'll need to call Facebook's 'activate app' event after configuration:

-Swift

// disable automatic tracking
FBSDKCoreKit.Settings.shared.isAutoLogAppEventsEnabled = false

// optional: call activateApp
FBSDKCoreKit.AppEvents.shared.activateApp()

 

What is the equivalent of this code in flutter?

Hey @asakirullah ,

 

For Flutter, you should call the following:

  // Disable automatic event tracking
FacebookAuth.instance.autoLogAppEventsEnabled = false;

// Optionally, activate the app manually
FacebookAppEvents().logActivateApp();

 

Let me know if that helps!


Hey @Michael Fogel  thanks for answering.

 

I am using this library for facebook app events: https://pub.dev/packages/facebook_app_events

But it does not have this function

FacebookAppEvents().logActivateApp();


Reply