Tenjin Reporting Metrics 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 |
|---|---|---|---|---|---|---|---|---|
| Reporting Metrics API | API | Aggregated metrics | ✅ | ✅ | ✅ | ✅ | ✅ |
Tenjin also provides an API for pulling aggregated metric data, the Reporting Metrics API, which provides:
- Cost data: can be regarded as advertiser data, including cost, click, impression, total revenue, and other data
- Revenue data: can be regarded as publisher data, including impressions and clicks of monetization ads and more detailed revenue data
Integration process
- Log in to the Tenjin dashboard and get the Access Token
- Log in to the AE backend, go to the Third-party Integration module, add Tenjin Reporting Metrics API, and complete the related configuration
- Check whether the AE system receives the data successfully, and build reports
1. Get the Access Token
The first step in connecting Tenjin data is to log in to the Tenjin dashboard and click AUTOMATE -> API Access Tokens in the navigation bar.
Create an Access token on the page shown in the image below. Note that you can name the token when you create it, and you can describe it by what the token is used for. The name can be changed later without affecting its use.
After you create the Access token, you can copy it on this page at any time. You can also revoke access on this page. Copy the token.
2. Plan configuration
After you get the Tenjin Access Token, log in to the AE system and configure the new plan in the Third-party Integration module. The image below shows the configuration page of Tenjin Reporting Metrics API. Follow this section to create the plan
2.1 Authorization information configuration
Click the Configure authorization information button under Authorization Information and enter the Access Token you obtained in the previous step in the pop-up:
2.2 Sync Schedule
In the Sync Schedule module, you can set the policy for the AE system to pull Tenjin Reporting Metrics API data on a schedule. You can choose to pull data for a period of time at a specific time every day. Because pulled data also counts toward the data volume, avoid pulling data for overly long periods on a schedule
2.3 Receive Settings
You can control whether the data is written as events. If you turn this off, the data is not written to the event table, so do not turn off this setting.
2.4 Configuration
Finally, in the Configuration module, you can control the detailed settings of data pulling, including the time aggregation granularity of the data, the metric fields and dimensions to pull, and the event name after ingestion.
The content of the configuration is a JSON, which you can customize as follows:
| Module | Name | Description |
|---|---|---|
| sink_event | event_mapping | Event name after ingestion; customizable; JSON type. The key corresponds to the report type, and the value is the ingestion event name for that report type. |
| source | report_types | Report type to pull. Tenjin Reporting Metrics API supports two report types. List type. We recommend that you enter only one element, that is, pull data for only one report at a time Allowed values: spend, ad_revenue. See the following content for details |
| metrics | Metrics in the data; list type. Different report types support different metrics, so pay attention when filling it in | |
| group_by | Grouping dimensions in the data; list type. Different report types support different group_by values, so pay attention when filling it in |
Because data configurations differ greatly between report types, we recommend that you use the configuration template for each level directly, or fine-tune the template
2.4.1 Spend template
The Spend template pulls the cost data of the API, that is, advertiser data. The following is the template for this interface, which you can copy in full into the integration configuration. To adjust it, refer to this subsection:
{
"sink_event": {
"event_mapping": {
"spend": "tenjin_spend_data",
"ad_revenue": "tenjin_ad_revenue_data"
}
},
"source": {
"group_by": [
"campaign",
"country"
],
"report_types": [
"spend"
],
"metrics": [
"spend",
"cpc",
"cpi",
"tcpi",
"cpm",
"total_rev",
"revenues",
"pub_rev",
"clicks",
"tracked_clicks",
"impressions",
"installs",
"tracked_installs",
"ctr",
"cvr",
"users"
]
}
}
- Analysis dimensions
Cost data provides the following analysis dimensions. By default, we use campaign, country as the analysis dimensions, and you can also choose other analysis dimensions as needed. To adjust, enter the analysis dimensions in source.group_by:
| Analysis dimension | Included dimension fields | Default |
|---|---|---|
| app | app_id, bundle_id | |
| channel | ad_network_name, ad_network_id, ad_network_icon_url | |
| country | country | |
| platform | platform | |
| site | site_id | |
| campaign | campaign_name, campaign_id, ad_network_name, ad_network_id, ad_network_icon_url, app_id, app_name, bundle_id, store_id, app_icon_url, channel, platform | |
campaign, country | campaign_name, campaign_id, ad_network_name, ad_network_id, ad_network_icon_url, app_id, app_name, bundle_id, store_id, app_icon_url, channel, platform, country | Yes |
| channel, app | ad_network_name, ad_network_id, ad_network_icon_url, app_id, bundle_id | |
| channel, app, country | ad_network_name, ad_network_id, ad_network_icon_url, app_id, bundle_id, country |
- Included metrics
Some key metrics have both a reported value and a tracked value. By default, we use the reported value. If you need to switch to tracked values, we recommend that you switch all of these metrics to tracked values to keep the data logically consistent. To adjust the connected metrics, write the API field names in source.metrics:
| API field | Field name | Description | Default |
|---|---|---|---|
| spend | Total spend | Total spend ($) | Yes |
| cpc | CPC | Average CPC ($) | Yes |
| cpi | CPI | Cost per reported install ($) | Yes |
| tcpi | CPI of tracked installs | Cost per tracked install ($) | Yes |
| cpm | CPM | Average CPM ($) | Yes |
cp_ksessions_Nd | Day N average cost per 1,000 Sessions | Average cost of 1,000 Sessions on day N ($) Range of N: 0, 1, 2, 3, 4, 5, 6, 7, 14, 30, 60, 90, 120 | |
| cp_user_Nd | Day N cost per retained user | Average cost of retained users on day N ($) Range of N: 0, 1, 2, 3, 4, 5, 6, 7, 14, 30, 60, 90, 120 | |
| roas_Nd | Day N ROAS | ROAS on day N (%) Range of N: 0, 1, 2, 3, 4, 5, 6, 7, 14, 30, 60, 90, 120 | |
| roi_Nd | Day N ROI | ROI on day N (%) Range of N: 0, 1, 2, 3, 4, 5, 6, 7, 14, 30, 60, 90, 120 | |
| total_rev | Total revenue | Total revenue ($) | Yes |
| total_arpu | Total ARPU | ARPU including in-app purchases and ads ($) | |
| total_rev_Nd | Day N LTV | LTV on day N ($) Range of N: 0, 1, 2, 3, 4, 5, 6, 7, 14, 30, 60, 90, 120 | |
| rpu_Nd | Day N total revenue LTV / users | LTV on day N divided by DAU ($) Range of N: 0, 1, 2, 3, 4, 5, 6, 7, 14, 30, 60, 90, 120 | |
| revenues | IAP revenue | Revenue from in-app purchases ($) | Yes |
| iap_arpu | IAP ARPU | ARPU including only in-app purchases ($) | |
| revenues_Nd | Day N IAP revenue LTV | LTV of in-app purchase revenue on day N ($) Range of N: 0, 1, 2, 3, 4, 5, 6, 7, 14, 30, 60, 90, 120 | |
| iap_rpu_Nd | Day N IAP revenue LTV / User | LTV calculated from IAP only on day N, divided by DAU ($) Range of N: 0, 1, 2, 3, 4, 5, 6, 7, 14, 30, 60, 90, 120 | |
| pub_rev | Ad revenue | Total ad revenue ($) | Yes |
| pub_arpu | Ad revenue ARPU | ARPU including only ad revenue ($) | |
| pubrev_Nd | Day N ad revenue LTV | LTV of ad revenue on day N ($) Range of N: 0, 1, 2, 3, 4, 5, 6, 7, 14, 30, 60, 90, 120 | |
| pub_rpu_Nd | Day N ad revenue LTV / users | LTV of ad revenue on day N divided by DAU ($) Range of N: 0, 1, 2, 3, 4, 5, 6, 7, 14, 30, 60, 90, 120 | |
| fraud_purchases | Fraudulent purchases | Number of fraudulent purchases | |
| fraud_revenue | Fraudulent revenue | Revenue from blocked fraudulent purchases ($) | |
| clicks | Reported clicks | Total number of reported clicks | Yes |
| clicks_difference | Click difference | Difference between reported clicks and tracked clicks | |
| clicks_difference_pct | Click difference percentage | Percentage difference between reported clicks and tracked clicks (%) | |
| tracked_clicks | Tracked clicks | Number of tracked clicks | Yes |
| blocked_clicks | Blocked clicks | Number of blocked clicks | |
| impressions | Reported impressions | Number of reported impressions | Yes |
| tracked_impressions | Tracked impressions | Number of tracked impressions | |
| installs | Reported installs | Number of reported installs | Yes |
| installs_difference | Install difference | Difference between reported installs and tracked installs | |
| installs_difference_pct | Install difference percentage | Percentage difference between reported installs and tracked installs (%) | |
| tracked_installs | Tracked installs | Number of tracked installs | Yes |
| ctr | CTR | Average CTR (%) | Yes |
| cvr | CVR | Average CVR (%) | Yes |
| all_fraud | Fraudulent events | Total number of fraudulent events | |
| blocked_device_events | Blocked device events | Number of blocked device events | |
| cpr | Completion Rate (CPR) | Average CPR Percentage (%) | |
| sessions | Sessions | Average number of Sessions | |
| sessions_Nd | Day N Sessions | Number of Sessions on day N Range of N: 0, 1, 2, 3, 4, 5, 6, 7, 14, 30, 60, 90, 120 | |
| users | DAU | Average DAU | Yes |
| retention_Nd | Day N retention rate | Retention rate on day N (%) Range of N: 0, 1, 2, 3, 4, 5, 6, 7, 14, 30, 60, 90, 120 | |
| users_Nd | Day N retained users | Number of retained users on day N Range of N: 0, 1, 2, 3, 4, 5, 6, 7, 14, 30, 60, 90, 120 | |
| tracked_cvr | Tracked conversion rate | Tracked conversion rate (%) |
- Ingestion rules
The day field in the data, that is, the date of the data, is set as the #event_time of the aggregated data
The event name used in the template is -- tenjin_spend_data
2.4.2 Ad Revenue template
The Ad Revenue template pulls the revenue data of the API, that is, publisher data. The following is the template for this interface, which you can copy in full into the integration configuration. To adjust it, refer to this subsection:
{
"sink_event": {
"event_mapping": {
"spend": "tenjin_spend_data",
"ad_revenue": "tenjin_ad_revenue_data"
}
},
"source": {
"group_by": [
"channel",
"app",
"country"
],
"report_types": [
"ad_revenue"
],
"metrics": [
"ad_revenue",
"clicks",
"ecpc",
"ecpm",
"impressions"
]
}
}
- Analysis dimensions
Revenue data provides the following analysis dimensions. By default, we use channel, app, country as the analysis dimensions, and you can also choose other analysis dimensions as needed. To adjust, enter the analysis dimensions in source.group_by:
| Analysis dimension | Default |
|---|---|
| app | |
| channel | |
| country | |
| channel, app | |
| channel, app, country | Yes |
| ad_placement |
- Included metrics
Some key metrics have both a reported value and a tracked value. By default, we use the reported value. If you need to switch to tracked values, we recommend that you switch all of these metrics to tracked values to keep the data logically consistent. To adjust the connected metrics, write the API field names in source.metrics:
| API field | Default | Description |
|---|---|---|
| ad_revenue | Yes | Total revenue |
| clicks | Yes | Total clicks |
| ecpc | Yes | eCPC (revenue per click) |
| ecpm | Yes | eCPM (revenue per 1,000 impressions) |
| impressions | Yes | Total impressions |
- Ingestion rules
The day field in the data, that is, the date of the data, is set as the #event_time of the aggregated data
The event name used in the template is -- tenjin_ad_revenue_data
2.5 Standardized fields
If the following event properties exist in the data, we standardize them automatically:
| Original field | Standardized field | Description |
|---|---|---|
| campaign_name | te_ads_object.campaign_name | Campaign name |
| campaign_id | te_ads_object.campaign_id | Campaign ID |
| ad_network_name | te_ads_object.media_source | Media source or monetization channel |
| store_id | te_ads_object.app_id | App ID |
| app_name | te_ads_object.app_name | App name |
| platform | te_ads_object.platform | Platform, such as Android or iOS |
| country | te_ads_object.country | Country or region code |
| 【USD】 | te_ads_object.currency | Currency of the cost or revenue |
| impressions | te_ads_object.impressions | Impressions |
| clicks | te_ads_object.clicks | Clicks |
| installs | te_ads_object.installs | Conversions (installs) |
| spend | te_ads_object.cost | User acquisition cost |
| ad_revenue | te_ads_object.revenue | Monetization revenue |

