trackAdShowEvent method

  1. @override
Future<void> trackAdShowEvent(
  1. String adUnionType,
  2. String adPlacementId,
  3. String adSourceId,
  4. String adType,
  5. String adnType,
  6. double ecpm,
)
override

上报原生App广告观看事件 AdShow

广告聚合平台类型 (取值为:topon、gromore、admore、self,分别对应Topon、Gromore、Admore、自建聚合) 广告瀑布流ID 广告源ID 广告类型 (取值为:reward、banner、 native 、interstitial、 splash ,分别对应激励视频广告、横幅广告、信息流广告、插屏广告、开屏广告) 广告平台类型(取值为:csj、gdt、ks、 mint 、baidu,分别对应为穿山甲、优量汇、快手联盟、Mintegral、百度联盟) 预估ECPM价格(单位为元)

Implementation

@override
Future<void> trackAdShowEvent(
  String adUnionType,
  String adPlacementId,
  String adSourceId,
  String adType,
  String adnType,
  double ecpm,
) async {
  try {
    methodChannel.invokeMethod('trackAdShowEvent', {
      'adUnionType': adUnionType,
      'adPlacementId': adPlacementId,
      'adSourceId': adSourceId,
      'adType': adType,
      'adnType': adnType,
      'ecpm': ecpm,
    });
  } on PlatformException catch (e) {
    print('trackAdShowEvent fail: ${e.message}');
  }
}