adjust-icon

ChartboostのHelium SDKの連携

Helium by Chartboostで広告収益を計測したい場合は、SDK間連携の機能を使用することで、Adjustサーバーにこの情報をパスすることができます。

[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];
}