Skip to main content

User level impression revenue

一、Prerequisite

  • Connect to the SDK according to the integration instructions;
  • Initialize the SDK and integrate a certain type of advertisement.。

二、ROI calculation

Advertising revenue can be obtained through the callback of TradPlus SDK and reported to third-party data platforms. In this way, the purchase volume and realization can be connected, and ROI can be calculated. Called through TPAdInfo in the listening callback:

VersionIntroduction
tpAdInfo.isoCodeCountry code
tpAdInfo.adSourceNameAdNetowrk platform name
tpAdInfo.adSourceIdAdNetowrk slot ID
tpAdInfo.loadTimeLoading time
tpAdInfo.ecpmGetEcpm
tpAdInfo.adUnitIdAd Unit

三、Set the global display callback of the app dimension

VersionIntroduction
V9.5.0.1+Optimized, can be called directly without setting setAdListener synchronously
V8.8.0.1+Provides a global display callback API.
Synchronization requires calling setAdListener of the corresponding type to receive GlobalImpressionListener monitoring.
V8.8.0.1and below versionsGet ad revenue through ad type's onAdImpression
TradPlusSdk.setGlobalImpressionListener(new GlobalImpressionManager.GlobalImpressionListener() {
@Override
public void onImpressionSuccess(TPAdInfo tpAdInfo) {
mFirebaseAnalytics = FirebaseAnalytics.getInstance(this);
if (tpAdInfo != null) {
Bundle bundle = new Bundle();
....
bundle.putString(FirebaseAnalytics.Param.CURRENCY, "USD");
bundle.putDouble(FirebaseAnalytics.Param.VALUE, tpAdInfo.ecpm/1000);
mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.AD_IMPRESSION, bundle);
}
}
});

For more information, developers please refer to the callback information description