ironSource Impression Level Revenue API
Note that data generated by third-party data integration counts toward the cluster's data consumption
Summary
Interface overview
| Interface | Type | Granularity | Attribution | Cost | Revenue | Impressions | Clicks | Conversions |
|---|---|---|---|---|---|---|---|---|
| Impression Level Revenue API | API | User data | ✅ | ✅ |
Impression Level Revenue API provides user-level ad impression data. You can use this data to analyze each user's revenue and the ad impressions of different users.
Integration process
- Set the AE SDK user identification field in the ironSource SDK
- Log in to the ironSource dashboard and get the App Key, Secret Key, and Refresh Token
- Log in to the AE backend, go to the Third-party Integration module, add an ironSource Impression Level Revenue API plan, and complete the related configuration
- Check whether the AE system receives the data successfully, and build reports
1. Client SDK configuration
To associate ironSource user data with the AE project, use the setUserId() method of ironSource to set the AE distinct ID as the ironSource UserId:
1.1 Option 1 (automatic integration)
-
If you integrate the Android or iOS SDK:
- If the SDK version is 2.8.0~2.8.1, you can use this option directly
- If the SDK version is 2.8.2 or later, you also need to install the third-party data plugin. For details, see Android SDK third-party data and iOS SDK third-party data
-
If you integrate Unity SDK 2.4.0 or later, or Unreal SDK 1.5.0 or later, you can use this option directly
Note that the AE SDK must be initialized before the ironSource SDK, and the automatic integration code must be enabled immediately after the ironSource SDK is initialized. Follow these steps:
1. Initialize the AE SDK.
2. Initialize the ironSource SDK
3. Call `enableThirdPartySharing` to set the distinct ID automatically.
The following are code samples for the SDK on each platform:
- Android
- iOS
- Unity
- Unreal
// 1. Initialize the Android SDK
TDConfig config = TDConfig.getInstance(this, APPID, TE_SERVER_URL);
TDAnalytics.init(config);
// 2. Initialize the ironSource SDK
// ...
// 3. Call the enableThirdPartySharing API to set ta_distinct_id in ironSource events
TDAnalytics.enableThirdPartySharing(TDThirdPartyType.IRON_SOURCE);
// 1. Initialize the iOS SDK
TDConfig *config = [[TDConfig alloc] init];
config.appid = appid;
config.serverUrl = url;
config.mode = TDModeDebug;
[TDAnalytics startAnalyticsWithConfig:config];
// 2. Initialize the ironSource SDK
// ...
// 3. Call the enableThirdPartySharing API to set ta_distinct_id in ironSource events
[TDAnalytics enableThirdPartySharing:TDThirdPartyTypeIronSource];
// 1. Initialize the Unity SDK
TDConfig config = new TDConfig("APPID","SERVER");
TDAnalytics.Init(config);
// 2. Initialize the ironSource SDK
// ...
//3. Call the enableThirdPartySharing API to set ta_distinct_id in ironSource events
TDAnalytics.EnableThirdPartySharing(TDThirdPartyType.IRONSOURCE);
// 1. Initialize the Unreal SDK
UTDAnalytics::Initialize();
// 2. Initialize the ironSource SDK
// ...
// 3. Call enableThirdPartySharing to set ta_distinct_id in ironSource events
TArray<FString> EventTypeList;
EventTypeList.Emplace(TEXT("TAThirdPartyShareTypeIRONSOURCE"));
UTDAnalytics::EnableThirdPartySharing(EventTypeList, AppID);
1.2 Option 2 (manual integration)
For manual integration, you need to use the setUserId() API in the ironSource SDK to set the distinct ID of the AE project.
Note that the AE SDK must be initialized before the ironSource SDK, and setUserId must be called after the ironSource SDK is initialized. Follow these steps:
1. Initialize the AE SDK.
2. Initialize the ironSource SDK.
3. Call `setUserId` to set the distinct ID.
The following are manual integration code samples for the SDK on each platform:
- Android
- iOS
- Unity
// 1. Initialize the Android SDK
TDConfig config = TDConfig.getInstance(this, APPID, TE_SERVER_URL);
TDAnalytics.init(config);
// 2. Initialize the ironSource SDK
// ...
// 3. Get the AE distinct ID, which corresponds to #distinct_id in AE
String distinctId = TDAnalytics.getDistinctId();
// 4. Set the AE distinct ID as the ironSource User ID
IronSource.setUserId(distinctId);
// 1. Initialize the iOS SDK
TDConfig *config = [[TDConfig alloc] init];
config.appid = appid;
config.serverUrl = url;
config.mode = TDModeDebug;
[TDAnalytics startAnalyticsWithConfig:config];
// 2. Initialize the ironSource SDK
// ...
// 3. Get the AE distinct ID, which corresponds to #distinct_id in AE
NSString *distinctId = [TDAnalytics getDistinctId];
// 4. Set the distinct ID in the events collected by ironSource
[IronSource setUserId:distinctId];
// 1. Initialize the Unity SDK
TDConfig config = new TDConfig("APPID","SERVER");
TDAnalytics.Init(config);
// 2. Initialize the ironSource SDK
// ...
// 3. Get the AE distinct ID, which corresponds to #distinct_id in AE
var distinctId = TDAnalytics.GetDistinctId();
// 4. Set the distinct ID in the events collected by ironSource
IronSource.Agent.setUserId(distinctId);
2. Get the authorization information
Next, log in to the ironSource dashboard to get the necessary authorization information
- First, click the user menu in the upper-right corner, go to the Reporting API tab of the My Account page, and get the Secret Key and Refresh Token
- Next, go to the Ad Unit page of the ironSource dashboard and select the app you want to connect in the APPLICATIONS list. The card on the right shows the app's App Key. Note it down (iOS and Android are separate. To connect data from both platforms, configure two plans and enter the respective App Keys)
3. Plan configuration
After completing the SDK configuration, log in to the AE system backend and configure ironSource Impression Level Revenue API in the Third-party Integration module. The image below shows the ironSource configuration page:
3.1 Authorization information configuration
Click the Configure authorization information button under Authorization Information, and enter the information you got during authorization in the pop-up (for Refresh Token, click the edit icon first to show the input box)
3.2 Sync Schedule
In the Sync Schedule module, you can set the policy for the AE system to pull ironSource Impression Level Revenue API data on a schedule. You can choose to pull data for a period of time at a specific time every day or every hour. Because pulled data also counts toward the data volume, avoid pulling data for overly long periods on a schedule
3.3 User identification fields
Because ironSource Impression Level Revenue API provides user-level data, you need to set user identification rules for it. Based on this configuration, the AE system sets these fields as the user identification fields of the data when it converts the pulled data.
If you configured the client SDK according to this document, use the following configuration:
- Field associated with the account ID: none
- Field associated with the distinct ID: user_id
3.4 Event Data Configuration
After you turn on the Event Data Configuration switch, all data sent back is written to the event table. We recommend that you enable event data ingestion.
3.5 User Properties Configuration
By default, the AE system doesn't write ironSource Impression Level Revenue API data to user properties. If you want to write some fields to the user table, first turn on the rule so that it runs, and then use the Property Mapping feature to add the fields to write to the user table. For Source Property, enter the ingested name of the field:
3.6 Configuration
In the Configuration module, you can control the detailed settings of data pulling, such as the event name after ingestion.
The configuration is a JSON, and you can adjust its content as needed
| Module | Name | Description |
|---|---|---|
| sink_event | event_name | Event name after ingestion; customizable |
| transfer | double_columns | Metric fields to convert to numeric type. All other ingested fields are ingested as strings. We don't recommend changing this |
3.7 Data ingestion rules
- user_id in the data is used as the distinct ID of the data. This field should correspond to the distinct ID in the AE project
- The event_timestamp field in the data, that is, the ad impression time, is used as the event's #event_time
- The event name is ironsource_ad_revenue_impression_level
- All other fields are ingested. The following are the fields returned by the Impression Level Revenue API:
- Dimension fields
| Field name | Description | Example value |
|---|---|---|
| event_timestamp | Impression timestamp | 2021-09-01 11:26:46 |
| #zone_offset | Time zone (AE preset property) | 0 (fixed value) |
| advertising_id | User's advertising ID (GAID / IDFA) | 137cf2f0-609c-4ae3-ab64-ed5c0d7392fd |
| advertising_vendor_id | User's vendor ID (app Set ID / IDFV) | A0810F0B-16C2-474B-B765-77B3A3113AA2 |
| user_id | User ID set by the user, that is, the user ID set in "1. Client SDK configuration" | c7d9fed7-aa40-4bfa-918f-8d4b155bfd4b |
| ad_unit | Ad unit | rewarded_video |
| ad_network | Ad network | Admob |
| instance_name | Instance name | Bidding, High |
| country | Country (region) code | US |
| placement | Placement | Home_Screen |
| segment | Name of the traffic segment the user is assigned to | Tier 1 |
| AB_Testing | A/B Test label | A,B |
| app_key | App key | |
| app_name | App name | |
| platform | Platform | iOS, android |
- Metric fields
| Field name | Description | Example value |
|---|---|---|
| revenue | Revenue amount | 0.5 |
3.8 Standardized fields
The following event properties are standardized:
| Original field | Standardized field | Description |
|---|---|---|
| ad_network | te_ads_object.media_source | Monetization channel |
| ad_unit | te_ads_object.ad_group_name | Unit name of the monetization ad |
| placement | te_ads_object.placement | Monetization ad placement |
| app_name | te_ads_object.app_name | App name |
| country | te_ads_object.country | Country or region code |
| platform | te_ads_object.platform | Platform, such as Android or iOS |
| Fixed value USD | te_ads_object.currency | Currency of the monetization revenue |
| revenue | te_ads_object.revenue | Monetization revenue |

