adjust-icon

Helium by Chartboost SDK 연동

Helium by Chartboost SDK의 광고 매출을 측정하고 싶다면, SDK간 연동을 사용하여 Adjust 서버로 광고 매출 정보를 전달할 수 있습니다.

예시

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);
}