facebookarchive / react-native-fbsdk

A React Native wrapper around the Facebook SDKs for Android and iOS. Provides access to Facebook login, sharing, graph requests, app events etc.
https://developers.facebook.com/docs/react-native
Other
2.99k stars 908 forks source link

AppEventsLogger - Not possible to log Standard Event e.g Complete Registration #800

Open dooleyb1 opened 4 years ago

dooleyb1 commented 4 years ago

🐛 Bug / Missing Feature Report

I am trying to update my app to log Standard Events such as the Complete Registration event in the case when a user has completed the registration process within my application. I am logging a custom event however in order to optimise my Facebook ads it needs to be this standard event which I have had no success logging.

From the native SDK docs I have found that there are two different events depending on device type:

iOS: FBSDKAppEventNameCompletedRegistration Android: EVENT_NAME_COMPLETED_REGISTRATION

There was a Pull Request made back in 2018 to perform similar functionality which was in turn closed and not merged to production: https://github.com/facebook/react-native-fbsdk/pull/381

I have also seen that the fb_mobile_complete_registration event maps to this Standard Event in places however from including this log event and testing it on my app I have not been successful in getting the Standard Event log to appear in the Events Manager on Facebook.

AppEventsLogger.logEvent("fb_mobile_complete_registration", {});

Does anyone have any more information on this topic that I might be missing or is it in fact a feature missing from this library?

Environment

System:
    OS: macOS 10.15.1
    CPU: (8) x64 Intel(R) Core(TM) i7-8557U CPU @ 1.70GHz
    Memory: 208.02 MB / 8.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.13.1 - /usr/local/bin/node
    Yarn: 1.19.2 - /usr/local/bin/yarn
    npm: 6.12.1 - /usr/local/bin/npm
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK:
      API Levels: 23, 26, 28, 29
      Build Tools: 28.0.3, 29.0.2
      System Images: android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.5791312
    Xcode: 11.3/11C29 - /usr/bin/xcodebuild
  npmPackages:
    react: ^16.9.0 => 16.13.1
    react-native: ^0.61.0 => 0.61.5
  npmGlobalPackages:
    react-native-cli: 2.0.1
Gp2mv3 commented 3 years ago

I can get fb_mobile_complete_registration to show in the event manager with the following code: AppEventsLogger.logEvent('fb_mobile_complete_registration', { fb_registration_method: 'web', _valueToSum: 123, fb_currency: 'USD' })

However, I can't get fb_mobile_add_payment_info with a similar approach: AppEventsLogger.logEvent('fb_mobile_add_payment_info', { fb_success: success })

I think it's an issue with the parameters but I can't figure what...