beta-appsflyer-adobe-mobile-ios-extension
When submitting an issue please specify your AppsFlyer sign-up (account) email , your app ID , production steps, logs, code snippets and any additional relevant information.
Table of content
- Adding the SDK to your project
- Initializing the SDK
- Guides
- API
- Data Elements
- Swift Example
- Collect IDFA with ATTrackingManager
This plugin is built for
- iOS AppsFlyer SDK v6.0.1-beta
📲 Adding the SDK to your project
Add the following to your app's Podfile
:
pod 'Beta-AppsFlyerAdobeExtension', '~> 6.0.1'
🚀 Initializing the SDK
Register the AppsFlyer extension from your Application
class, alongside the Adobe SDK initialisation code:
...
#import "AppsFlyerAdobeExtension/AppsFlyerAdobeExtension.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[ACPCore configureWithAppId:@"Key"];
...
[AppsFlyerAdobeExtension registerExtension];
...
[AppsFlyerAdobeExtension registerCallbacks:^(NSDictionary *dictionary) {
NSLog(@"[AppsFlyerAdobeExtension] Received callback: %@", dictionary);
if([[dictionary objectForKey:@"callback_type"] isEqualToString:@"onConversionDataReceived"]){
if([[dictionary objectForKey:@"is_first_launch"] boolValue] == YES){
NSString* af_status = [dictionary objectForKey:@"af_status"];
if([af_status isEqualToString:@"Non-organic"]){
NSLog(@"this is first launch and a non organic install!");
}
}
} else if([[dictionary objectForKey:@"callback_type"] isEqualToString:@"onAppOpenAttribution"]) {
NSLog(@"onAppOpenAttribution Received");
}
}];
[AppsFlyerAdobeExtension callbacksErrorHandler:^(NSError *error) {
NSLog(@"[AppsFlyerAdobeExtension] Error receivng callback: %@" , error);
}];
return YES;
}
In Addition to adding the init code, the settings inside the launch dashboard must be set.
Setting | Description |
---|---|
AppsFlyer iOS App ID | Your iTunes application ID (required for iOS only) |
AppsFlyer Dev Key | Your application devKey provided by AppsFlyer (required) |
Bind in-app events for | Bind adobe event to appsflyer in-app events. For more info see the doc here. |
Send attribution data | Send conversion data from the AppsFlyer SDK to adobe. This is required for data elements. |
Debug Mode | Debug mode - set to true for testing only. |
Note: For Send attribution data, use this feature if you are only working with ad networks that allow sharing user level data with 3rd party tools.
📖 Guides
- Deep Linking
- In-App Events
- Data Elements
- Attribution Data tracking with Adobe Analytics
- Deeplink Data tracking with Adobe Analytics
📑 API
See the full API available for this plugin.
📂 Data Elements
Check out the available data elements here.
Swift Example
Collect IDFA with ATTrackingManager
-
Add the
AppTrackingTransparency
framework to your xcode project. -
In the
Info.plist
:- Add an entry to the list: Press + next to
Information Property List
. - Scroll down and select
Privacy - Tracking Usage Description
. - Add as the value the wording you want to present to the user when asking for permission to collect the IDFA.
- Add an entry to the list: Press + next to
-
Call the
waitForAdvertisingIdentifierWithTimeoutInterval
api beforeregisterExtension
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[ACPCore setLogLevel:ACPMobileLogLevelVerbose];
[ACPCore configureWithAppId:@"launch-key"];
if (@available(iOS 14, *)) {
[[AppsFlyerLib shared] waitForAdvertisingIdentifierWithTimeoutInterval:60];
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status){
}];
}
[AppsFlyerAdobeExtension registerExtension];
...
return YES;
}
- On your test device verify that Settings > Privacy > Tracking > Allow Apps to Request to Track, is toggled on.