Skip to content
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

Cannot see events on Events Manager dashboard #2068

Open
5 tasks done
CRoig opened this issue May 19, 2022 · 12 comments
Open
5 tasks done

Cannot see events on Events Manager dashboard #2068

CRoig opened this issue May 19, 2022 · 12 comments

Comments

@CRoig
Copy link

CRoig commented May 19, 2022

Checklist before submitting a bug report

Xcode version

13.3.1

Facebook iOS SDK version

13.2.0

Dependency Manager

SPM

SDK Framework

Core

Goals

See my events displayed on Events Manager

Expected results

After opening the app, I want to see session started event on Event Manager

Actual results

Nothing appears

Steps to reproduce

Find in code samples, the content of my AppDelegate

Code samples & details

AppDelegate.swift 

func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool {
        return ApplicationDelegate.shared.application(app,
                                                   open: url,
                                                   sourceApplication: options[UIApplication.OpenURLOptionsKey.sourceApplication] as? String,
                                                   annotation: options[UIApplication.OpenURLOptionsKey.annotation])
}

SceneDelegate.swift

func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
        guard let url = URLContexts.first?.url else { return }
        AEMReporter.configure(withNetworker: nil, appID: "XXXXXXXXX", reporter: nil)
        AEMReporter.enable()
        AEMReporter.handle(url)
        ApplicationDelegate.shared.application(
            UIApplication.shared,
            open: url,
            sourceApplication: nil,
            annotation: [UIApplication.OpenURLOptionsKey.annotation]
        )
    }

Setup Settings

Settings.shared.enableLoggingBehavior(.appEvents)
Settings.shared.enableLoggingBehavior(.networkRequests)
Settings.shared.enableLoggingBehavior(.developerErrors)
Settings.shared.enableLoggingBehavior(.graphAPIDebugInfo)
Settings.shared.enableLoggingBehavior(.accessTokens)
Settings.shared.isAutoLogAppEventsEnabled = true
Settings.shared.isAdvertiserIDCollectionEnabled = true
@CRoig
Copy link
Author

CRoig commented May 19, 2022

Also, I found out that a request is made on every event to

https://graph.facebook.com/v13.0/XXXXXXXX/aem_conversion_configs?advertiser_ids=%5B%5D&debug=info&fields=&format=json&include_headers=false&sdk=ios

and the response is always

{
"data": [

]
}

@CRoig
Copy link
Author

CRoig commented May 24, 2022

After firing the Settings configs on didBecomeActive, I manage to see events being flushed. Nevertheless, I still can not see them on Event Manager

FBSDKLog: FBSDKAppEvents: Flushed @ 1653398625.000000, 3 events due to 'EagerlyFlushingEvent' - {
.....
Flush Result: Success

@DmitryGolovin-azur
Copy link

same

@remychantenay
Copy link

Exact same issue here, despite following the documentation to the tee.

Xcode version: 13.4
Facebook iOS SDK version: 13.2.0 (also tried 13.0.0 and 12.3.2)

Requests against graph.facebook.com are successful (200, empty data), but nothing shows in Events Manager.

We also tried – in vain – while having the Facebook app installed (logged in) in the background with ATT enabled on both apps after spotting this comment.

We are running out of ideas.

@ahtokca
Copy link

ahtokca commented Jun 12, 2022

Same here, I do see events flushed both android/ios and Deep Link verification passed, however no events recorded

I've contacted FB support and got "App has not configured properly with FB SDK." with an advice to read https://developers.facebook.com/docs/app-ads/overview

@matthewfx
Copy link

In my case, in addition to the above, the Event manager displays the warning "Update your apps to the latest Facebook SDK"... I can see in logs that SDK makes calls etc but apparently I don't have the SDK...

@hateart
Copy link

hateart commented Jun 23, 2022

I struggled with the same issue until went through this checklist thebergamo/react-native-fbsdk-next#66 (comment)
Finally, events start work.

@spiritinlife
Copy link

Check if you have defined ips in Server ip Whitelist in Settings > Advanced > Security. If that is the case u are subject to this issue that i opened in facebook android sdk ( facebook/facebook-android-sdk#1094 ) but is the same of ios. It seems requests like App install to the graph api use the client token when in the previous sdks they didn't. For some reason such requests are subject to be blocked if the client ip is not in the Server ip Whitelist. For mobile clients this is ridiculous so the only viable solution for now is to not have any ips defined in the Server ip whitelist so that u can whitelist all.

@matthewfx
Copy link

Thanks for your advice but I've given up on integrating with Facebook SKD. It should be straightforward and easy but it seems like they don't care and configuring it properly is more like walking through a minefield.

@AlexSheiko
Copy link

Adding ApplicationDelegate.initialize() to AppDelegate.swift helped me finally see the events
Screenshot 2022-07-29 at 15 42 20

Full code:

  1. AppDelegate.swift
import UIKit
import Foundation
import FBSDKCoreKit

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
   override func application(
       _ application: UIApplication,
       didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
   ) -> Bool {

       ApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: launchOptions)
       ApplicationDelegate.initialize()
       Settings.shared.isAutoLogAppEventsEnabled = true
       Settings.shared.isAdvertiserIDCollectionEnabled = true
       Settings.shared.isAdvertiserTrackingEnabled = true

       return super.application(application, didFinishLaunchingWithOptions: launchOptions)
   }

   override func applicationDidBecomeActive(_ application: UIApplication) {
       AppEvents.shared.activateApp()
       Settings.shared.enableLoggingBehavior(.appEvents)
       Settings.shared.enableLoggingBehavior(.developerErrors)
       Settings.shared.enableLoggingBehavior(.cacheErrors)
       Settings.shared.enableLoggingBehavior(.uiControlErrors)
   }
}
  1. Info.plist
<key>CFBundleURLTypes</key>
<array>
   <dict>
   	<key>CFBundleURLSchemes</key>
   	<array>
   		<string>fb...</string>
   	</array>
   </dict>
</array>
<key>FacebookAppID</key>
<string>...</string>
<key>FacebookDisplayName</key>
<string>...</string>
<key>FacebookClientToken</key>
<string>...</string>
<key>FacebookAutoLogAppEventsEnabled</key>
<string>true</string>
<key>FacebookAdvertiserIDCollectionEnabled</key>
<string>true</string>

@DonTharaka
Copy link

Facebook documentation on app events is very vague. It does not contain any information about ATTrackingManager which is necessary to track events. First follow all steps in the documentation. Below are the steps I have taken to successfully connect app events (iOS 15):

  1. Info.Plist
    Screen Shot 2022-08-11 at 10 44 47 am

  2. SceneDelegate

Screen Shot 2022-08-11 at 10 50 43 am

Screen Shot 2022-08-11 at 11 05 33 am

Screen Shot 2022-08-11 at 10 48 40 am

This will bring up the following pop up:

Screen Shot 2022-08-11 at 10 58 05 am

  1. In your viewcontroller:

Screen Shot 2022-08-11 at 10 52 39 am

@ghost
Copy link

ghost commented Jun 12, 2023

i am working for last 3 days

Device : iPhone 13
version: iOS 16.5

Screenshot 2023-06-12 at 12 14 05 PM

After implementing i see my device version in the list with event
Screenshot 2023-06-12 at 12 12 38 PM

Also check my log

2023-06-10 15:57:12.456735+0530 OJOLife[29995:7162246] FBSDKLog: FBSDKAppEvents: Flushed @ 1686392832.000000, 1 events due to 'Timer' - {
    "advertiser_id" = "4B95C0EB-73AB-43A2-9E6C-XXXXXXXXXX";
    "advertiser_id_collection_enabled" = 1;
    "advertiser_tracking_enabled" = 1;
    "anon_id" = "XZ3AE32712-B137-47E2-8071-XXXXXXXXX";
    "application_tracking_enabled" = 1;
    "custom_events" = "[{\"_eventName\":\"fb_mobile_content_view\",\"_logTime\":1686392821,\"fb_content\":\"{\\\"screen\\\":\\\"Home\\\"}\",\"_ui\":\"OJOLife.NavVC\"}]";
    event = "CUSTOM_APP_EVENTS";
    extinfo = "[\"i2\",\"com.ojolife.dietitioclinic\",\"5\",\"1.2.0\",\"16.5\",\"iPhone14,5\",\"en_IN\",\"IST\",\"--\",390,844,\"3.00\",6,119,5,\"Asia\\/Kolkata\"]";
    ud = "{}";
    "url_schemes" = "[\"com.googleusercontent.apps.XXXXXX-962s8s2nhitmvivqie5h9ls3t8m6rf1g\",\"https\",\"com.ojolife.dietitioclinic\",\"App-prefs\"]";
}
Events: [
  {
    "event" : {
      "_eventName" : "fb_mobile_content_view",
      "_logTime" : 1686392821,
      "fb_content" : "{\"screen\":\"Home\"}",
      "_ui" : "OJOLife.NavVC"
    },
    "isImplicit" : false
  }
]

but when i see the custom log events for iphone where as i cant find any one where for android working fine

Screenshot 2023-06-12 at 12 18 58 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants