I am trying to send App Events from Hybrid mobile app(cordova). Through Facebook Pixel event can be sent but as stated by this blog - "Sending App Events in the context of a mobile application can provide a number of advantages over sending pixel events".
Events for hybrid mobile apps as per this facebook documentation mentions it is possible to convert Facebook Pixel event into App Events. The total code change required in your application is two lines (one native, one web).
For web fbq('init', ); fbq('set', 'mobileBridge', , );
For Native: android: AppEventsLogger.augmentWebView(, )
ios: [FBSDKAppEvents augmentHybridWKWebView:];
So my question is where to updated this native part code in case of android and ios in cordova app?
Documentation: https://developers.facebook.com/docs/app-events/hybrid-app-events/
It states (the full statement): "When you augment a webview from iOS or Android, we inject a window level object called fbmq_. The Pixel, when set up to look for a mobile bridge, finds this window level fbmq object each time an fbq call is made."
Let`s brake it down:"When you augment a webview from iOS or Android..."
Android:
iOS:
"...we inject a window level object called fbmq_. The Pixel, when set up to look for a mobile bridge, finds this window level fbmq object each time an fbq call is made.""
Setup should look something like this:
Disclaimer: This is not tested and is an only theoretical implementation based on the documentation that Facebook provides.