Hello,
I don’t have any conversion on facebook ads, even though the IDFA are sent to Facebook on Revenue Cat and the traffic only comes from Facebook ads.
I have read the docs but could not find a proper full example.
Here is what I have done (swift).
I have tested where to call FBSDKCoreKit.AppEvents.activateApp() (before or after ATT request)
Option 1:
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: pUIApplication.LaunchOptionsKey: Any]?) -> Bool {
FBSDKCoreKit.Settings.isAutoLogAppEventsEnabled = false
FBSDKCoreKit.AppEvents.activateApp()
Purchases.automaticAppleSearchAdsAttributionCollection = true
Purchases.configure(withAPIKey: "XXXXXXXX")
Purchases.shared.collectDeviceIdentifiers()
Purchases.shared.setFBAnonymousID(FBSDKCoreKit.AppEvents.anonymousID)
if #available(iOS 14.5, *) {
ATTrackingManager.requestTrackingAuthorization { status in
switch status {
case .authorized:
Purchases.shared.collectDeviceIdentifiers()
FBSDKCoreKit.Settings.setAdvertiserTrackingEnabled(true)
FBSDKCoreKit.Settings.isAdvertiserIDCollectionEnabled = true
default:
FBSDKCoreKit.Settings.setAdvertiserTrackingEnabled(false)
FBSDKCoreKit.Settings.isAdvertiserIDCollectionEnabled = false
}
}
} else {
Purchases.shared.collectDeviceIdentifiers()
FBSDKCoreKit.Settings.setAdvertiserTrackingEnabled(true)
FBSDKCoreKit.Settings.isAdvertiserIDCollectionEnabled = true;
}
}
}
Option 2:
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: OUIApplication.LaunchOptionsKey: Any]?) -> Bool {
FBSDKCoreKit.Settings.isAutoLogAppEventsEnabled = false
Purchases.automaticAppleSearchAdsAttributionCollection = true
Purchases.configure(withAPIKey: "XXXXXXXX")
Purchases.shared.collectDeviceIdentifiers()
Purchases.shared.setFBAnonymousID(FBSDKCoreKit.AppEvents.anonymousID)
if #available(iOS 14.5, *) {
ATTrackingManager.requestTrackingAuthorization { status in
switch status {
case .authorized:
Purchases.shared.collectDeviceIdentifiers()
FBSDKCoreKit.Settings.setAdvertiserTrackingEnabled(true)
FBSDKCoreKit.Settings.isAdvertiserIDCollectionEnabled = true;
DispatchQueue.main.async {
FBSDKCoreKit.AppEvents.activateApp()
}
default:
FBSDKCoreKit.Settings.setAdvertiserTrackingEnabled(false)
FBSDKCoreKit.Settings.isAdvertiserIDCollectionEnabled = false;
DispatchQueue.main.async {
FBSDKCoreKit.AppEvents.activateApp()
}
}
}
} else {
Purchases.shared.collectDeviceIdentifiers()
FBSDKCoreKit.Settings.setAdvertiserTrackingEnabled(true)
FBSDKCoreKit.Settings.isAdvertiserIDCollectionEnabled = true;
FBSDKCoreKit.AppEvents.activateApp()
}
}
}
In either case I have some IDFA collected and sent to Facebook but I cannot see any conversion events.
Thanks for your help,