la-haus / flutter-segment

Segment.io library for flutter
MIT License
22 stars 138 forks source link

Request: Facebook App Events Support #52

Open b099l3 opened 2 years ago

b099l3 commented 2 years ago

Context

I am looking to use Facebook App Events, only the Application Installed event, to track ads -> installs.

Current state of play

There is only a native and react-native support for this and Flutter we will have to add in to this repo or fork.

From reading these issues on this repo, I assume there is going to be work towards a "Fully Dynamic and Scalable Segment Integration":

b099l3 commented 2 years ago

Went with option 2:

b099l3 commented 2 years ago

Fix for the Application Installed event:

ariefwijaya commented 1 year ago

@b099l3 We can use cloud mode for facebook, no need to add the facebook library in our flutter-segment. Just add facebook destination from segment admin panel. https://segment.com/docs/connections/destinations/catalog/facebook-app-events/

image

For the advertising id, I fetch it from this plugin https://pub.dev/packages/advertising_id and set it manually using our existing method:

Segment.setContext({
     'device': {
       'adTrackingEnabled': adTrackingEnabled.toString(),
       'advertisingId': advertisingId,
     }
   });
b099l3 commented 1 year ago

See this https://github.com/la-haus/flutter-segment/pull/54#issuecomment-1295875295 for details about why this didn't work in my case.