adjust-icon

Helium by Chartboost SDK integration

If you want to measure ad revenue with the Helium by Chartboost SDK, you can use SDK-to-SDK integration to pass this information to Adjust’s servers.

Example

public void ilrdObserver (final HeliumImpressionData impData) {
final AdjustAdRevenue adjustAdRevenue = new AdjustAdRevenue("helium_chartboost_sdk");
// extract the ILRD payload
final JSONObject json = impData.getIlrdInfo();
try {
final double adRevenue = json.getDouble("ad_revenue");
final String currencyType = json.getString("currency_type");
adjustAdRevenue.setRevenue(adRevenue, currencyType);
} catch (JSONException e) {
// error handling as either revenue or currency was not present
return;
}
// optional fields
final String networkName = json.optString("network_name"); // Helium demand network name
final String placementName = json.optString("placement_name"); // Helium placement name
final String lineItemName = json.optString("line_item_name"); // Helium line item name
adjustAdRevenue.setAdRevenueNetwork(networkName);
adjustAdRevenue.setAdRevenueUnit(placementName);
adjustAdRevenue.setAdRevenuePlacement(lineItemName);
// Send Adjust ad revenue
Adjust.trackAdRevenue(adjustAdRevenue);
}