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

[NSNotificationCenter.defaultCenter addObserverForName:kHeliumDidReceiveILRDNotification
object:nil
queue:nil
usingBlock:^(NSNotification * _Nonnull notification) {
// extract the ILRD payload
HeliumImpressionData *ilrd = (HeliumImpressionData *)notification.object;
NSDictionary *json = ilrd.jsonData;
// mandatory fields
NSNumber *ad_revenue = [json objectForKey:@"ad_revenue"];
NSString *currency_type = [json objectForKey:@"currency_type"];
ADJAdRevenue *adRevenue = [[ADJAdRevenue alloc]
initWithSource:@"helium_chartboost_sdk"];
[adjustAdRevenue setRevenue:[ad_revenue doubleValue] currency:currency_type];
// optional fields
NSString *network_name = [json objectForKey:@"network_name"]; // Helium demand network name
NSString *placement_name = [json objectForKey:@"placement_name"]; // Helium placement name
NSString *line_item_name = [json objectForKey:@"line_item_name"]; // Helium line item name
[adjustAdRevenue setAdRevenueNetwork:network_name];
[adjustAdRevenue setAdRevenueUnit:placement_name];
[adjustAdRevenue setAdRevenuePlacement:line_item_name];
// Send Adjust ad revenue
[Adjust trackAdRevenue:adjustAdRevenue];
}