AppsFlyerAdRevenue [LEGACY]
Deprecated in v6.15.0
(Supported until SDK v6.14.6 For versions including and above v6.15.0 use logAdRevenue
)
Overview
AppsFlyerAdRevenue is the parent class for the ad revenue SDK.
Properties
MediationNetworkType
Constants
Type | Name | Description |
---|---|---|
String | ironsource | The name of the mediation network. |
String | applovinmax | The name of the mediation network. |
String | googleadmob | The name of the mediation network. |
String | fyber | The name of the mediation network. |
String | appodeal | The name of the mediation network. |
String | admost | The name of the mediation network. |
String | topon | The name of the mediation network. |
String | tradplus | The name of the mediation network. |
String | yandex | The name of the mediation network. |
String | chartboost | The name of the mediation network. |
String | unity | The name of the mediation network. |
String | customMediation | The mediation solution is not on the list of supported mediation partners. |
String | directMonetizationNetwork | The app integrates directly with monetization networks without mediation. |
Methods
start
Method signature
(void)start;
Description
Initializes the ad revenue SDK.
Input arguments
This method doesn't accept input arguments.
Returns
void
.
logAdRevenue
Method signature
(void)logAdRevenueWithMonetizationNetwork:(NSString * _Nonnull)monetizationNetwork
mediationNetwork:(AppsFlyerAdRevenueMediationNetworkType)mediationNetwork
eventRevenue:(NSNumber * _Nonnull)eventRevenue
revenueCurrency:(NSString * _Nonnull)revenueCurrency
additionalParameters:(NSDictionary * _Nullable)additionalParameters
Description
Logs an ad revenue impression.
Input arguments
Type | Name | Description |
---|---|---|
String | monetizationNetwork | The name of the monetization network. |
MediationNetworkType | mediationNetwork | Enum of the mediation network. |
String | revenueCurrency | Currency of the ad revenue event. |
NSNumber | eventRevenue | Amount of the ad revenue event. |
NSDictionary | additionalParameters | Contains native and custom fields for the ad revenue payload, as described in the following usage example. |
Returns
void
.
Usage example
let adRevenueParams:[AnyHashable: Any] = [
kAppsFlyerAdRevenueCountry : "us",
kAppsFlyerAdRevenueAdUnit : "02134568", //Add ! here
kAppsFlyerAdRevenueAdType : "Banner", //Add ! here
kAppsFlyerAdRevenuePlacement : "place",
"foo" : "testcustom",
"bar" : "testcustom2"
]
AppsFlyerAdRevenue.shared().logAdRevenue(
monetizationNetwork: "facebook",
mediationNetwork: MediationNetworkType.moPub,
eventRevenue: 0.026,
revenueCurrency: "USD",
additionalParameters: adRevenueParams)
Updated 4 months ago