How to use the ROAS optimizer with campaigns on external mediations

The ironSource ROAS optimizer is an automated tool that utilizes both in-app purchase (IAP) and ad revenue measurement (ARM) data to optimize campaigns according to return on advertising spend (ROAS) goals. 

With both in-app revenue and ad revenue, the ROAS optimizer algorithm can automatically calculate and update the optimal bid for each campaign at various granularity levels. 

Follow the steps below to use the ironSource ROAS optimizer withMoPub as your mediation solution: 

How to enable ARM for MoPub 

  1. Ensure that you have integrated ironSource SDK 7.1.5+
  2. Enable MoPub’s Impression-Level Revenue Data (ILRD) feature  
  3. Use ironSource API setAdRevenueData 

Step 1: Integrate ironSource SDK

Integrate ironSource Adapter 7.1.5+ , Mopub SDK Version 5.16.4+ 

Step 2: Enable MoPub ILRD

Follow Mopub’s instructions, as defined here: Enable ILRD 

Step 3: Call API setAdRevenueData

Send the ImpressionData object, received as part of MoPub’s onImpression callbacks, using ironSource setAdRevenueData API. 



public static void setAdRevenueData(@NotNull String dataSource, @NotNull JSONObject impressionData);


public void onImpression(@NonNull final String adUnitId, @Nullable final ImpressionData impressionData) {
   ironSource.setAdRevenueData("MOPUB", impressionData);



+ (void)setAdRevenueDataWithDataSource:(NSString *)dataSource impressionData:(NSData *)impressionData;


- (void)didTrackImpressionWithAdUnitID:(NSString *)adUnitID impressionData:(MPImpressionData * _Nullable)impressionData {
    [IronSource setAdRevenueDataWithDataSource:@"MOPUB" impressionData:[impressionData jsonRepresentation]];


Make sure to add ironSource UnityPackage to your project. 

You can download it from here


void setAdRevenueData (String dataSource, Dictionary<string, string> impressionData);


private void OnImpressionTrackedEvent(string adUnitId, MoPub.ImpressionData impressionData){
     ironSource.Agent.setAdRevenueData("MOPUB", impressionData );