Ad revenue API

ironSource App Analytics provides analysis of the application revenue from ads. The analysis is performed based on the impression data available via the relevant callback from your ad mediation.

Analyzing the ad revenue within the application rely on two phases:

  • Impression level revenue callback registration
  • Ad revenue API 

* ironSource App Analytics only supports the ironSource impression data

Impression level revenue callback registration

Prior to the App Analytics SDK initialization, register to your mediation callback for receiving ad impression level data

ironSource Impression level revenue

The API for registration to the ironSource impression level revenue callback can be found here

Ad revenue API

Use this API to pass the impression data of the ads viewed by the user, to allow the ad revenue analysis. This will include the relevant ad unit type, the revenue and other information

Pass all impression data as received to the App Analytics SDK, without any update

// The Ad revenue API
+(void)updateImpressionData:(ISAnalyticsMediationName) mediationName withImpressionData:(NSDictionary *) impressionData;
// The Ad revenue API
static func updateImpressionData(mediationName: ISAnalyticsMediationName, impressionData: Dictionary<String, Any>)

Parameters

  • ISAnalyticsMediationName mediationName – The type of mediation that is the source of the impression data.
    • Currently, the only enumeration value is IRONSOURCE.
  • NSDictionary * impressionData – The impression data in Dictionary format. Should be passed as a whole

Note: All parameters are mandatory 

Example of Ad revenue update API

// Example of Ad revenue 
- (void)impressionDataDidSucceed:(ISImpressionData *)impressionData {
    [IronSourceAnalytics updateImpressionData:ISAnalyticsMediationNameIRONSOURCE          
withImpressionData:impressionData.all_data];
}
// Example of Ad revenue 
func impressionDataDidSucceed(_ impressionData: ISImpressionData!) {
    IronSourceAnalytics.updateImpressionData(mediationName:          
ISAnalyticsMediationName.IRONSOURCE, impressionData:impressionData.all_Data)
}