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
|
Beta Was this translation helpful? Give feedback.
Replies: 47 comments 19 replies
-
I have the same problem. Please let me know if you find any solution. |
Beta Was this translation helpful? Give feedback.
-
I've been having the same issue. I got it to work somehow by initializing in |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
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.. |
Beta Was this translation helpful? Give feedback.
-
@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 |
Beta Was this translation helpful? Give feedback.
-
@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. |
Beta Was this translation helpful? Give feedback.
-
@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 |
Beta Was this translation helpful? Give feedback.
-
@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. |
Beta Was this translation helpful? Give feedback.
-
@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. |
Beta Was this translation helpful? Give feedback.
-
@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? |
Beta Was this translation helpful? Give feedback.
-
@jpiabrantes Confirm if the time for the events is |
Beta Was this translation helpful? Give feedback.
-
@faithomotoso I've just tried the real-time events test with Android. No events are shown too. |
Beta Was this translation helpful? Give feedback.
-
@jpiabrantes Do you mind sharing how you implemented it? |
Beta Was this translation helpful? Give feedback.
-
@faithomotoso Automatically logged events are working in your setup? |
Beta Was this translation helpful? Give feedback.
-
@AntonLT yes. App installs and launch gets logged. Although I've only ever used a simulator. |
Beta Was this translation helpful? Give feedback.
-
@jpiabrantes Do you need any special configuration? |
Beta Was this translation helpful? Give feedback.
-
@hahai96 Can you check under settings if your app has the |
Beta Was this translation helpful? Give feedback.
-
Any of the stuff mentioned here does not work for me |
Beta Was this translation helpful? Give feedback.
-
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! |
Beta Was this translation helpful? Give feedback.
-
@jenkliu I'm not tracking purchase events. I think users have to allow tracking before anything is sent to facebook. |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
Hi everyone, My EnvironmentOperating System and version: MacOS Big Sur see flutter doctor
ISSUE 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, |
Beta Was this translation helpful? Give feedback.
-
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():
|
Beta Was this translation helpful? Give feedback.
-
but, how use the uuid generated by appTrackingTransparencyProvider.requestTrackingAuthorization() |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
@AntonLT in
info.plist
add