adjust-icon

TopOn SDK integration

If you want to record your ad revenue with the TopOn SDK, you can use the SDK-to-SDK integration to pass this information to Adjust’s servers.

Before you begin

Follow the integration guide to integrate the Adjust SDK in your app.

Example

To record ad revenue information with Adjust, create an ADJAdRevenue instance inside your handleAdjustRevenueReport function. See the Send ad revenue information guide for more information.

- (void)handleAdjustRevenueReport:(NSDictionary *)extra {
// Developers with high precision requirements need to convert themselves
double price = [extra[@"publisher_revenue"] doubleValue];
NSString *currency = extra[@"currency"];
ADJAdRevenue *adRevenue = [[ADJAdRevenue alloc] initWithSource:ADJAdRevenueSourceTopOn];
[adRevenue setRevenue:price currency:currency];
[adRevenue setAdRevenuePlacement:extra[@"network_placement_id"]];
[adRevenue setAdRevenueUnit:extra[@"adunit_id"]];
[Adjust trackAdRevenue:adRevenue];
}