This endpoint should only be used when sending Impression-Level Revenue Data (ILRD) directly via S2S for a mediation provider that is not yet officially integrated with Tenjin.
Authentication #
We authenticate every request sent to the Tenjin server using the API Key as the username in basic auth or as a parameter api_key.
Note: Server-to-server integration is not a standard feature for all Tenjin clients. Please contact your Tenjin account manager if you would like to be whitelisted for this feature.
Generic Endpoint #
Path: https://track.tenjin.io/v0/ad_impressions/
メソッド:POST
Content-Type: application/x-www-form-urlencoded
Device Information Parameters #
Parameters with * are required
| Parameters | 例 | 説明 |
| bundle_id* | com.tenjin.wordfinder | アプリのバンドルID |
| advertising_id* | be277924-d076-456d-9a20-3c8dee5663d3 | The raw advertising ID of the device. Please note that the request will only be accepted with a valid device id (any of advertising_id, developer_device_id, and analytics_installation_id). It’s important to stay consistent in sending the device id types. For iOS, it should be IDFA. In the case of no user consent, advertising_id can be empty or all zeros, and IDFV needs to be provided in developer_device_id along with analytics_installation_id For Android, either advertising_id or analytics_installation_id should be provided. |
| developer_device_id* | 5f4dcc3b-5aa5-40e1-8914-7a9c5d5ebf31 | Alternative field for device unique identifier, used when there is no advertising id.For iOS, it should be IDFV. |
| analytics_installation_id* | 91d1c313-dd94-4bd3-bbbb-16c8b7afa054 | Tenjin generated Application Install-specific identifier.Available by customer callback or SDK.Android SDKiOS SDKUnity SDK |
| platform* | ios | Platform of the appiosandroid (with Google Play Store)android_other (with no Google Play Store, e.g. devices with Chinese app stores)amazon (with Amazon App Store) |
| app_version* | 1.5 | アプリバージョン Androidの場合: String app_version = context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionName + “.” + context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionCode) iOSの場合: [[[NSBundle mainBundle] infoDictionary] objectForKey:@”CFBundleShortVersionString”] |
| app_version_code | 2 | Android only Android App Version: https://developer.android.com/studio/publish/versioning |
| build_id | RQ3A.211001.001 | Androidの場合: String build = String.valueOf(Build.ID) iOSの場合: @import Darwin.sys.sysctl; NSString *build(void) { size_t bufferSize = 64; NSMutableData *buffer = [[NSMutableData alloc] initWithLength:bufferSize]; int status = sysctlbyname(“kern.osversion”, buffer.mutableBytes, &bufferSize, NULL, 0); if (status != 0) { return nil; } return [[NSString alloc] initWithCString:buffer.mutableBytes encoding:NSUTF8StringEncoding];} |
| carrier | T-2 | Mobile Carrier (Internet Service Provider) |
| connection_type | wifi | mobile/wifi |
| country | US | ISOロケール国コード規格(例:Appleのドキュメントを参照)。 |
| device | blueline | Android: android.os.Build.DEVICE (reference)iOS: systemInfo.machine (reference) |
| device_brand | ||
| device_manufacturer | ||
| device_model | Pixel 3 | Androidの場合: String device = Build.MODEL; iOSの場合: @import Darwin.sys.sysctl; NSString *device(void) { size_t bufferSize = 64; NSMutableData *buffer = [[NSMutableData alloc] initWithLength:bufferSize]; int status = sysctlbyname(“hw.machine”, buffer.mutableBytes, &bufferSize, NULL, 0); if (status != 0) { return nil; } return [[NSString alloc] initWithCString:buffer.mutableBytes encoding:NSUTF8StringEncoding];} |
| device_product | blueline | Android only: build.PRODUCT |
| language | en | Two-letter ISO 639‑1 Code |
| limit_ad_tracking | FALSE | 広告トラッキングを許可しない? (true, false) |
| opt_in | TRUE | Device Opt-in consent for GDPR compliance: Tenjin SDK implementation |
| locale | en_US | Androidの場合:String locale = Locale.getDefault().toString() iOSの場合:[[NSLocale currentLocale] localeIdentifier] |
| os_version | 14 | Androidの場合: String.valueOf(Build.VERSION.SDK_INT) iOSの場合: [[UIDevice currentDevice] systemVersion] |
| os_version_release | 14.3.1 | For Android only: full os release version |
| タイムゾーン | Europe/Ljubljana | |
| user_agent | Linux; U; Android 11; SM-A505FN Build/RP1A.200720.012 | User agent of user’s device |
| screen_height | 2028 | |
| screen_width | 1080 | |
| sent_at | 1693581566830 | Epoch time in milliseconds |
| session_id | f4239af1-cd6f-49e8-8b97-f61a9e81a7e0 | |
| source_app_store | googleplay | Android only: unspecified, googleplay, amazon, other |
| ip_address* (Required to determine device country) | 87.123.246.9 | The User’s IP Address. This is used to look up countries for Google DMA user consent parameters. |
| ad_user_data (Required by Google) | 1 | Googleユーザー同意シグナルパラメータ:広告のためのユーザーレベルデータのサードパーティ送信に対する同意。1:同意あり、0:同意拒否。ユーザー同意データがない場合は、リクエストからパラメータを完全に削除してください(空白にしないでください)。 |
| ad_personalization (Required by Google) | 1 | Googleユーザー同意シグナルパラメータ:パーソナライズド広告の同意 同意した場合は1、同意しなかった場合は0 ユーザー同意データがない場合は、リクエストからパラメータを完全に削除してください(空白にしないでください)。 |
Revenue Information Parameters #
Parameters with * are required
| Parameters | 例 | 説明 |
| ad_revenue_mediation* | max | Mediation platform name, please use values belowmaxironsourceadmobhyperbidtoponcastradplusFor other mediation, use `custom` |
| network_name* | mintegral | Network name that display the ad, usually passed by the mediation provider |
| currency* | 米ドル | The ISO currency codes, e.g. USD, JPY |
| revenue_decimal* | 0.001 | Revenue in decimal for ONE impressiononly require either revenue_decimal or revenue_cpmWhen receive both, revenue_decimal will be prioritized |
| revenue_cpm | 1.0 | Revenue in CPM, equals to revenue_decimal * 1,000 |
| mediation_country | US | Country from mediation provider, in the ISO two-letter country codes e.g. US |
| ad_unit_id | 09807a44b2f855cc | Winningネットワークが報告した広告ユニットID |
| ad_format | banner | Format of the ad unit: banner, mrec, xpromo, native, leaderboard/leader, interstitial/inter, rewarded/reward, rewarded_inter/rewarded_interstitial |
| precision | BID | Value passed by mediation, indicates the source of the revenue, like BID, CPM, RATE |
| creative_id | 9299584 | Value passed by mediation, |
| 配置 | Banner123 | Value passed by mediation for publisher-defined ad placement name |
| ネットワーク配置 | Banner_name | Placement name of the external Ad Network |
| auction_id | 27d38ef0-847c-11ec-8b8d-3fe5d30476ca_765960010 | Value passed by mediation |
Request Example #
curl -X POST https://track.tenjin.com/v0/ad_impressions/ -H “Content-Type: application/x-www-form-urlencoded” -d ‘api_key=api_key&advertising_id=123&ad_revenue_mediation=max&network_name=google&mediation_country=US¤cy=USD&ad_unit_id=1&ad_format=banner&revenue_decimal=0.01&precision=BID&creative_id=2&placement=banner_1&auction_id=3&bundle_id=com.tenjin.test&platform=ios&ad_user_data=1&ad_personalization=1’