SDK集成测试工具 #
When sending events to Tenjin, it’s useful to use Tenjin’s Live Debugging Event Tool to debug if events are firing as expected. Any events sent through a test device (to the Live Debugging tool) will not get recorded in the dashboard reporting.
The Live Event tool can be found in 这里:
How to use the Live Event Tool #
要开始使用该工具从你的应用中实时调试和跟踪事件,需要以下几个步骤:
- 点击此处添加你的测试设备,点击Test Devices。

- 点击+ New Test Device 来新增测试设备以验证应用是否正常向 Tenjin 发送事件。

- 选择你的 App 并输入你的测试设备 ID。 具体查询设备 ID 的办法,请依据测试手机的不同生产厂商,自行上网搜索。(iOS 平台为IDFA或IDFV;安卓平台为GAID ,全称 Google advertising ID,中文为广告 ID,只要手机有 Google 的服务框架,就有 GAID;安卓中国及海外华为如无 GAID,请输入 OAID)。

- Navigate back to the Live Event tool and open your app with the Tenjin SDK installed on the test device that you submitted your advertising ID for. If your events are firing correctly you should see something similar to the event below. If you register the test device just now, please allow upto 3 hours before you fire the event.

在面板上检查 SDK 集成状态 #
测试没有问题后,Tenjin 的控制面板同样可让你实时查看 SDK 是否已经正确集成。你可以从 Apps 标签页中选择要集成的应用程序,查看所有相关事件,以确保正确的设置。绿色的 received 表明我们已经收到相关事件。

你可以看到App版本、会话数量、Apple Search Ads安装、广告收入展示(ILRD)、已验证收据的IAP,以及任何已正确触发的自定义事件。
SDK集成检查清单 #
在App上架之前,请务必严格遵循清单进行SDK集成,避免不必要的麻烦,降低数据出现问题的可能性。
如果您正在使用Test Flight应用程序,即使注册了 'advertising_id',也无法在 SDK Live event 实时事件测试工具中看到事件。这是因为 Apple 的政策要求每一次用户打开应用时,Test Flight 都要使用新的 advertising_id。
- App open 事件
确保你能看到 App open 事件。App open事件将在 SDK 初始化时自动触发,具体事件数量级别取决于你的 App 所处的生命周期。
- ASA 追踪数据 (iOS)
Tenjin automatically pulls Apple Ads Attribution through our SDK. No need to do additional campaign setting (tracking link, callback etc). Integration instructions: Tenjin iOS SDK
- Android Referrer Install
Android referrer 可以在广告 ID 不存在的时候用来追踪。请参考以下内容:
- 确保已集成 Google’s Install Referrer Library。
dependencies {
implementation 'com.google.android.gms:play-services-ads-identifier:{version}'
implementation 'com.android.installreferrer:installreferrer:{version}'
}- 内购
Tenjin有6种 purchase_states,沙盒(sandbox)账号产生的的应用内购对应的是 purchase_state = 4. 只有purchase_state 3会显示在控制面板上,所以用使用测试工具对内购进行验证非常重要(只有在SDK Live Test Tools中才会看到沙盒测试中的交易)。应用内购的数值可以有小数。
内购上报时,请确保币种、价格、产品id及数量准确无误的传递到Tenjin。例如,你可以测试用不同的币种如Yen/USD/CAD来测试内购,并查看测试工具即时收到的记录。
The different purchase states in Tenjin are:
0 = UNKNOWABLE (there was no receipt and there is no way for tenjin to validate with the app store)
1 = UNVERIFIED (there was a receipt but there was an error with the app store validation)
2 = FRAUDULENT (the purchase was fraudulent)
3 = VERIFIED (the receipt was successfully validated with the app store)
4 = SANDBOX (this was a test purchase)
5 = DUPLICATE (there are duplicate purchases sent for the same transaction_id)
6 = STALE (the purchase event happened 3 days ago and not in real time)- 订阅收入(如有)
- 自定义事件
确保你看到所有自定义事件正确名称和数值。
- Ad Mediation Impressions 展示层级收益数据
Tenjin支持从以下平台接收 Impression Level Ad Revenue (ILRD,展示层级广告变现) 数据:
- AppLovin MAX
- Unity Level Play
- AdMob
- TopOn
- CAS
- Tradplus
此功能允许接收与广告收入相对应的事件,用于分析各项广告对变现的影响。