Skip to main content
Question

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

  • August 27, 2024
  • 2 replies
  • 239 views

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
  • 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
  • Active Member
  • 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();