Skip to main content
Question

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


Forum|alt.badge.img+6

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?

This post has been closed for comments

2 replies

Michael Fogel
Forum|alt.badge.img+6
  • Dedicated Contributor
  • 382 replies
  • August 29, 2024

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!


Forum|alt.badge.img+6
  • Author
  • Member
  • 9 replies
  • August 30, 2024

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();


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings