Skip to main content

AppsFlyer integration

Overview#

You can choose S2S (server to server) or C2S (client to server) method to return advertising monetization data to AppsFlyer. Both methods have their own advantages:

MethodData accuracyData real-time
S2SUse the advertising platform reporting API to return revenue with accurate dataSynchronize once a day, please check AppsFlyer documentation
C2SThere are errors when using TradPlus to estimate earnings.real time upload

|

Note :#

If you have authorized the monetization revenue data of other advertising platforms in the AF background, and the TradPlus advertising monetization data already includes this advertising platform, be sure to shut down the authorization of these platforms in the AF background first, and then enable the TradPlus aggregated advertising revenue docking, otherwise it will Generate duplicate data.

1.S2S#

TradPlus has connected with the global attribution platform AppsFlyer to connect user-level monetization data. Developers using TradPlus can complete the configuration in the AppsFlyer backend in just three steps:

Step 1: Search for TradPlus#

Enter the AppsFlyer backend, select Active Intergrations from the left menu, click the Find all partners button to enter the Marketplace page, search for "TradPlus", and click Set up intergrations on the TradPlus homepage.

Step 2: Enter configuration information#

  • Enter the Ad revenue tab and turn on "Get ad revenue date "
  • Enter the API Key, which corresponds to the Report API Key in the TradPlus backend (in the "My Account" interface)
  • Enter the Network App Id, which corresponds to the App ID in the TradPlus backend

Step 3: Click Test Connection to test the interface link status#

  • If the link is successful, click "Save Ad Revenue" in the lower right corner.
  • If the link fails, you can check the specific status of the API. If "Invalid Credentials" is displayed, please check whether the entered information is correct. If the change still fails, please contact your AF account manager.


2.C2S#

Step 1: When the ad is displayed successfully, TradPlus will return the eCPM of the ad#

NSNumber *ecpm = adInfo[@"ecpm"];

*For native and banner, because it is impossible to accurately identify whether the display is successful, eCPM can be obtained when the load is successful, but the income will be slightly more than the actual amount. Rewarded videos and interstitials do not have this problem.

Step 2: Convert eCPM to Revenue#

CGFloat revenue = [ecpm floatValue] / 1000.0;

Step 3: Report Revenue through Appsflyer data tracking method (trackEvent):#

Rich in-app events—Overview

Step 4: View Revenue and ROI in the Appsflyer#

Menu:Overview->Aggregated performance report

Example code:#

#import <TradPlusAds/TradPlus.h>
[TradPlus sharedInstance].impressionDelegate = self;
#pragma mark - TradPlusAdImpressionDelegate
- (void)tradPlusAdImpression:(NSDictionary *)adInfo
{
NSNumber *ecpm = self.rewardAd.adInfo[@"ecpm"];
CGFloat revenue = [ecpm floatValue] / 1000.0;
[[AppsFlyerLib shared] logEvent:AFEventPurchase withValues: @{
AFEventParamRevenue: @(revenue),
AFEventParamCurrency: @"USD",
}];
}