-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Facebook App Events not working #273
Comments
It doesn't seem vague or unclear, but my problem (as I guess the only maintainer currently active at the moment) is that this is not a use case of mine at all - I have no experience with app events or install optimization etc, so I can't serve as a sanity check. I recognize that's not directly helpful, but if it helps to set (or, unset?) expectations perhaps that's useful, as far as it goes. Apologies |
@mikehardy No worries, thanks so much for the response! I understand that the Facebook specific use cases might fall outside the typical knowledge of this repo/maintainers. Our mistake may have been a silly one (as they usually are) We never put
And we were also missing:
(for iOS) We'll deploy soon and see if our changes resolve the issue. One small recommendation if I may add would be to put this part of the README under the 'Installation/Setup' section or right after it and before the 'Troubleshooting' section.
And then the same goes for the 'Usage' section (e.g. putting it directly after Installation) It could totally just be so if so, feel free to ignore the recommendation 😄 But I know in other repos/npm package docs. troubleshooting typically is the last section and instalation/setup + usage are at the top. I think my brain went too fast and just ignored anything after Troubleshooting. But that may be something I need to work! Anyway, I will update this open issue with our resolution, in the case it may help anyone else in the future. |
Hopefully your changes get things working for you! If they do, and the README could use improvement feel free to post a PR changing things up for the better, happy to merge anything reasonable and the github web UI for markdown editing is pretty easy to use when posting up docs PRs |
Well, we made some progress but still not able to link our app to optimize for app installs. With our changes I put above we were able to verify our apps deep link and successfully test our app events via the App Ads Helper tool from Facebook. We've continued our conversation with Facebook support and hoping we find a resolution soon. If anyone in the community has successfully add @mikehardy I'd like to keep this issue open, if that's alright with you, until we figure it out because once we do, I think it would be helpful to help out next dev if they run into this issue. |
@mikehardy One more question - What impact, if any, are you aware of, does I believe I saw another issue related to this topic. Our app dashboard in facebook is saying that our iOS version is out of date (currently 13.2.0) |
V14 just came out a few days ago. If you think that's the issue it would be great to post a PR doing the forward port to it. Unlikely that's the problem though |
Ok, great to know! Facebook support had recommended upgrading, but that didn't seem to be a necessary change. |
Understandable on their part they want the upgrade, it's not possible to rule out their newest code has fixed some related thing, and as someone frequently pulled in to troubleshooting (like here) the rule of "update to current version and try to reproduce again" is reflexive, for good reason. I checked to see how difficult the forward-port to v14 was, it appeared nearly trivial. It's posted here #278 |
Update, it seemed to work in testing of my work app so I just kicked it out via CI here. v9 is live (with fully up to date underlying SDKs) https://github.com/thebergamo/react-native-fbsdk-next/releases/tag/v9.0.0 |
@mikehardy Thanks for upgrading to v14. I upgraded to Also, similar to OP, on our Facebook adsets we are seeing an error our ad account not being associated with our app's events. Below you can see that the test events are firing on Android but the issue persists. |
There may be something new with the new SDK or not, I'm not sure, unfortunately these things aren't use cases of mine. I use this SDK for login (and maintain it for that main purpose under auspices of my work on react-native-firebase for Invertase) and that works. So I'm not really a help here. My role will be limited really to merging PRs in this area, but the source is all available |
@mikehardy Appreciate you chiming in. I'll dig into the issue! @squirrelhomie could you post how you are initializing the SDK + where you are setting Below are mine: [
"react-native-fbsdk-next",
{
"appID": "[APP_ID]",
"clientToken": "[CLIENT_TOKEN]",
"displayName": "My App",
"advertiserIDCollectionEnabled": false,
"iosUserTrackingPermission": "This information is used to personalize your experience",
"autoLogAppEventsEnabled": true
}
] // imported from expo-tracking-transparency
const { status } = await requestTrackingPermissionsAsync();
Settings.initializeSDK();
if (status === 'granted') {
await Settings.setAdvertiserTrackingEnabled(true);
}
AppEventsLogger.logEvent('test_event'); |
I'm facing the exact issue now. I'm able to get app events flowing through to my Facebook app as a source (checked via FB Events Manager) using From research, it seems like it is because my iOS/Android apps have not yet been verified by Facebook via their app-ads.txt verification mechanism. I've followed their instructions but Facebook just won't confirm my ownership. It seems like i'm not alone. I'm not sure if this is a bug on Facebook's end or mine but according to facebook "After your ownership is confirmed, you’ll be able to optimize your ads for app installs." At the end of the day, all we want is to see how many downloads and not who we got from the Fb Ad. This supposed simple task has been proven to be incredibly challenging. Does anyone have any pointers? EDIT - It seems there is a bug on Facebook (potentially Playstore/App store too) and their mobile app ownership verification system. I'll leave the link here for others to follow (requires u to have a facebook developer account) - https://developers.facebook.com/support/bugs/1192900408124136/?join_id=f25832a0b30574c EDIT 2- The solution that worked for me to overcome the mobile app ownership verification issue was to convert my app-ads.txt to UTF-8 and reupload. Hope this helps someone. |
The app install event is no longer sent when upgrading to the API version 14, I have remarked that by not receiving an App Install event (the others events works fine) on my new app with same configuration and code source of an old working app (with API 13) And by switching the version in the settings of my old app it confirm my thought that it's related to the API version The problem is that in the new app it's impossible to downgrade the API since Facebook not allowing to use old Version in newly created applications. |
I'm seeing android and custom events on iOS submit fine, but automatic events such as install aren't appearing in the dashboard at all. I've also filed a ticket #288 |
Hi all if you haven't looked at the documentation for v14.0 upgrade, please check it out. It clearly states: "Delay Automatic Event Logging for [Android] or [iOS]- Pause logging of app events, such as app installs and app launches, until User consent has been obtained." https://developers.facebook.com/docs/app-events/upgrade-guide/ I am assuming this is what is causing issue for many of you. |
Thanks for pointing that out, if it seems worthwhile and you wanted to PR the changelog with a note about this, it might help future folks |
Unfortunately I have done that in our app @aaggarwa88, that didn't change anything for us sadly. |
Be aware of this facebook/facebook-android-sdk#1094 |
We have recently set up the FB SDK for tracking events in our app. It also been quite a headache for us, and we are still seeing issues with the App Install event. Surprisingly, we've had no real issues with our iOS integration, but are facing issues tracking app installs on Android. Environment
Issues
We do see other automated events such as 'App Launch'/'Activate app' on Android. We also see custom events. We have no issues on iOS; it seems to be an Android-only issue. @spiritinlife thank you for bringing the IP policy to my attention. Just for clarification: Are you saying that the app install event will work with Android SDK 13+ if the IP whitelist policy is blank? So like this: |
@ekegus Yes you should have that blank, i have also opened the issue on facebook https://developers.facebook.com/support/bugs/716612102738375/. This happens because the MOBILE_APP_INSTALL(App install) event is using the client_token as an access token and not an app or user access token as subsequents requests do. For some reason the client_token is subject to being blocked if you have defined ips in the Server IP allowlist. So only viable solution for me was to allow all ips. After that change i see ios and android events coming in event manager ( including app install ) |
Interesting. We have not set any IP policy so something else must be the reason for the The only slightly suspect thing I see from our logs is this warning:
I see a similar warning for @squirrelhomie have you been able to resolve the issues you've been having? Also, did you see any issues with the App install event on Android or were you only having issues on iOS? |
we have integrated react-native_fbsdk_next. All the automated events and manual events are working as expected. But I need some clarification on the "fb_codeless_debug" event. In our app this "fb_codeless_debug" event is triggering at some point and we don't know at which point this event is triggering. Is this one of the automated event? if yes please explain at which point this event will be triggered. |
@gokuls1999 I think you might be better served examining / asking in the upstream facebook-ios-sdk / facebook-android-sdk repositories, we do not generate any events here, we just wrap the underlying SDKs |
For my team the solution was enabling autoLogAppEventsEnabled and advertiserIDCollectionEnabled flags in the Expo app config which seems quite obvious right now. I know that maybe this is not ideal solution for everyone in this thread but if you're using Expo I'm quite sure this will be the solution. @mikehardy I will create a PR to update the Expo documentation to avoid the future misunderstandings about this flags. |
Here you find the documentation about my solution: Enabling Auto App Installs in Expo |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
🐛 Bug Report
We are having a lot of trouble implementing the FB SDK and optimizing our Facebook campaigns for App Installs and are looking for any guidance possible.
We have added
react-native-fbsdk-next
to our app and followed instructions for both iOS and Android. We confirmed App Events are being sent to Facebook:However, when we attempt to create a campaign that optimizes for App Installs in Facebook, we contioustly receive this error:
We spoke over the weekend for hours with Facebook Support via chat and their reply has been consistent that:
To prove the point even more, our Facebook App received more events this morning for App Installs:
But we continue to receive the same message from Facebook.
So now, our next thought is possibly there is a bug in
react-native-fbsdk-next
or missing documentation on how to set this up correctly in Facebook Business Manager for App Install optimization.To Reproduce
react-native-fbsdk-next
8.0.5
(npm and pods)Expected Behavior
App Events should be successfully sent to Facebook to allow us to create an App Install optimized campaign
Environment
Production
I understand that this may be a little vague or not super clear whether this is a bug in
react-native-fbsdk-next
, with us, or with Facebook. At the very least, a sanity check would be helpful. When Facbeook is telling us that the app is not receiving events, but we can clearly see the events, it's making us feel like we're kind of going crazy.If anyone can provide any guidance on this, we would greatly appreciate it! Also, if there is a better community space to post this, please let me know. Want to make sure we don't clog up the issue pipeline for this project if this isn't the right space. Thanks!
The text was updated successfully, but these errors were encountered: