Not sending events to Facebook on iOS 14+ #122
Expected BehaviorSending events from iOS 14 and receive them at the events tester. Current BehaviorNo events received. Possible SolutionI read about upgrade Facebook SDK version at least to 8.0 (9.0 if you need login), but I think that is not the problem. Here we use 9.1 Steps to Reproduce (for bugs)
ContextWe are working to improve our analytics for better campaigns and better KPIs. Your Environment
|
Replies: 47 comments 19 replies
|
I have the same problem. Please let me know if you find any solution. |
|
I've been having the same issue. I got it to work somehow by initializing in |
|
Been able to resolve this. You have to request tracking permission before logging events would work. I used this package https://pub.dev/packages/app_tracking_transparency. |
|
I am having the same problem. Do I need to update to the 0.12 version? I am also using 0.11.2 to avoid the null safety.. |
|
@jpiabrantes I don't think you need to update. You have to request a permission from the user before event tracking would work on iOS 14.5 |
|
@faithomotoso I am asking for permission with https://pub.dev/packages/app_tracking_transparency and it is still not working. I really don't want to update to 2.0. |
|
@jpiabrantes go to settings and select the app you're working on, check if there's an allow tracking button. Also it takes a while for events to be sent to facebook, about 20 minutes or so |
|
@faithomotoso There's an allow tracking button, and it's on! I am testing the facebook events as it is explained here they say events should appear within 30 secs. |
|
@jpiabrantes Okay, that part never worked for me, probably because of SKAdAPI on iOS 14.5. But wait a while, should show up in the main events. |
|
@faithomotoso One event is getting through (the View Content), however, it does not show the parameters I've sent. The other events don't even appear on the list. Any ideas? |
|
@jpiabrantes Confirm if the time for the events is |
|
@faithomotoso I've just tried the real-time events test with Android. No events are shown too. |
|
@jpiabrantes Do you mind sharing how you implemented it? |
|
@faithomotoso Automatically logged events are working in your setup? |
|
@AntonLT yes. App installs and launch gets logged. Although I've only ever used a simulator. |
|
@jpiabrantes Do you need any special configuration? |
|
@hahai96 Can you check under settings if your app has the |
|
Any of the stuff mentioned here does not work for me |
|
I added the app_tracking_transparency library and made sure I have "Enable tracking" on in Settings. I am getting some Purchase events in my Facebook ads dashboard, however my analytics dashboard shows 5-6x more Purchase events than that. Is this because a user needs to tap "Allow tracking" on the dialogue in order for any event of theirs to be logged? I read here that Facebook will still track the top-priority event (Purchases) for users who opt out of tracking, but am not sure if I'm missing something. @jpiabrantes @faithomotoso @AntonLT are you tracking Purchase events? If so, can you clarify if you are receiving ALL Purchase events or only those for users who explicitly opt in to tracking? Thank you! |
|
@jenkliu I'm not tracking purchase events. I think users have to allow tracking before anything is sent to facebook. |
|
I will convert this to a discussion, as it seems to be a very relevant discussion with good information for future troubleshooting. But it doesn't seem to be an issue to be fixed in the plugin, as I understand from the thread. |
|
Hi everyone, My EnvironmentOperating System and version: MacOS Big Sur see flutter doctorISSUE DESCRIPTIONI do receive all events on Android and IOS 12 on the event real-time tester. BUT, I don't receive any event on IOS 14 !!! NOTE : I underline that on the same code, the IOS 12 iphone send all the events, so there is no issue on IOS 12. I tried every point mentionned in this discussion, but nothing worked for me. So here all the fixing I tried and please let me know if something is missing here :
NOTE: I even set these two keys on
NONE of the actions above solved the IOS 14 issue. Please anyone has a clue of why we do not receive events on IOS 14 ? Regards, |
|
Thx for answering. It did not change anything. On IOS 12.5.4 : it works. just in case, here is my code, which is in main(): |
|
but, how use the uuid generated by appTrackingTransparencyProvider.requestTrackingAuthorization() |
|
Hi, I did all the steps: added all in info.plist (FacebookAppID, FacebookClientToken, FacebookAdvertiserIDCollectionEnabled, CFBundleURLSchemes, etc), I request the app transparency tracking inside the app, and also upgraded FacebookSDK to latest version, but still I don't receive events in the test event console. It's strange because I can see some standard events logged (like app install or activated app) in the general info tab on facebook business manager, but others like Subscription or Purchase are not showing. And I can't test in real time because I can't see any event logging in the test event console. Someone knows why this could be happening? Thanks |
|
Hi @santiLabhouse , It's been I long time I had this issue, and I remember I finally received events a few days later. Even my SDK update was detected days later. It seems like IOS14 has a mechanism in which conversion events are not real-time and are delayed. This mechanism is called SKAdNetwork, it is set by Apple to protect private data related to attribution. It is pretty complicated to me as the mechanism is quite technically. If you want to learn more about it, you can read this: Im not sure if this explains why events are not received on the test console, but in my case, it made sense as I received test events days later. Everything worked well but only with a delayed time. |
|
Hi @mayouf , thank you for your explanation. I will wait some days to see if I receive events in the test console with delayed time. I hope that the configuration is correct and the problem remains on the SKAdNetwork. |
|
The same thing happened to me, I couldn't track the events of the device in ios. I solved it in the following way. 2.- restart the facebook application and leave it in the background. 3.- restart your application. after this I was able to see my application events. In the same way, check that you have added your platform to the configuration in the IOS configuration panel. As a comment in my case I had to add this library to give the application permission to track the user's information by the new apple policies. I share my validation code in flutter. import 'dart:io' show Platform;
import 'package:app_tracking_transparency/app_tracking_transparency.dart';
import 'package:facebook_app_events/facebook_app_events.dart';
class FacebookTracking {
FacebookTracking();
Future<void> _facebookTracking() async {
FacebookAppEvents facebookAppEvents = FacebookAppEvents();
await facebookAppEvents.setAdvertiserTracking(enabled: true);
await facebookAppEvents.setAutoLogAppEventsEnabled(true);
}
Future<void> _iosValidation() async {
//Request tracking to user in ios devices.
TrackingStatus status =
await AppTrackingTransparency.requestTrackingAuthorization();
if (status == TrackingStatus.authorized) {
await _facebookTracking();
}
}
Future<void> _androidValidation() async {
await _facebookTracking();
}
Future<void> init() async {
if (Platform.isAndroid) {
await _androidValidation();
}
if (Platform.isIOS) {
await _iosValidation();
}
}
}
I hope this helps you, it worked for me but each problem can be different in each case. |
|
People and @DennisAlund the package works as expected for IOS 12 & 14 ONLY if you have already the Facebook App installed on your device, with an already activated user. |






@AntonLT in
info.plistadd