알립니다
이 기능은 베타 서비스입니다. 개선 의견과 문의사항은 에어브릿지 CSM을 통해 전달해 주세요. 담당 CSM이 없는 경우 문의하기를 통해 전달해 주세요. 정식 서비스에서 발전한 기능으로 보답하겠습니다.
에어브릿지와 AD(X)를 연동해 광고로 발생한 수익과 관련된 데이터를 에어브릿지 대시보드에서 확인할 수 있습니다. 에어브릿지는 AD(X)와의 SDK 연동을 지원합니다.
아래 링크에 따라 AD(X) SDK를 설치해 주세요.
AD(X)에서 발생한 광고 수익 데이터를 에어브릿지로 전송합니다. AD(X) SDK에 광고 수익 데이터 콜백을 설정합니다. 해당 콜백을 활용하여 광고 수익 데이터를 에어브릿지 SDK로 전송합니다.
rewardedAd.OnPaidEvent += RewardedAd_OnPaidEvent;
void RewardedAd_OnPaidEvent(double ecpm)
{
var revenue = ecpm / 1000f;
var adPlatform = "AD(X)";
var adUnitName = "ADX Rewarded Ad";
var adFormat = "RewardedAd";
var currency = "USD";
AirbridgeEvent @event = new AirbridgeEvent("airbridge.adImpression");
var adx = new Dictionary<string, object>();
adx["ad_platform"] = adPlatform;
adx["ad_unit_name"] = adUnitName;
adx["ad_format"] = adFormat;
adx["value"] = revenue;
adx["currency"] = currency;
var adPartners = new Dictionary<string, object>();
adPartners["adx"] = adx;
@event.SetAction(adUnitName);
@event.SetLabel(adFormat);
@event.SetValue(revenue);
@event.AddSemanticAttribute("adPartners", adPartners);
@event.AddSemanticAttribute("currency", currency);
AirbridgeUnity.TrackEvent(@event);
}
rewardedAd.paidEventHandler = { eCPM in
let revenue = eCPM / 1000
let adPlatform = "AD(X)"
let adUnitName = "ADX Rewarded Ad"
let adFormat = "RewardedAd"
let currency = "USD"
let event = ABInAppEvent()
event?.setCategory("airbridge.adImpression")
event?.setAction(adUnitName)
event?.setLabel(adFormat)
event?.setValue(revenue)
event?.setSemantics([
"adPartners": [
"adx": [
"ad_platform": adPlatform,
"ad_unit_name": adUnitName,
"ad_format": adFormat,
"value": revenue,
"currency": currency
]
],
"currency": currency
])
event?.send()
}
self.rewardedAd.paidEventHandler = ^(double eCPM) {
double revenue = eCPM / 1000;
NSString* adPlatform = "AD(X)";
NSString* adUnitName = "ADX Rewarded Ad";
NSString* adFormat = "RewardedAd";
NSString* currency = "USD";
ABInAppEvent* event = [[ABInAppEvent alloc] init];
[event setCategory:@"airbridge.adImpression"];
[event setAction:adUnitName];
[event setLabel:adFormat];
[event setValue:revenue];
[event setSemantics:@{
@"adPartners": @{
@"adx": @{
@"ad_platform": adPlatform,
@"ad_unit_name": adUnitName,
@"ad_format": adFormat,
@"value": @(revenue),
@"currency": currency
}
},
@"currency": currency
}];
[event send];
};
rewardedAd.setOnPaidEventListener(object : OnPaidEventListener() {
fun onPaidEvent(ecpm: Double) {
val revenue = ecpm / 1000
val adPlatform = "AD(X)"
val adUnitName = "ADX Rewarded Ad"
val adFormat = "RewardedAd"
val currency = "USD"
val event = Event("airbridge.adImpression")
val adx = mutableMapOf<String, Any?>()
adx["ad_platform"] = adPlatform
adx["ad_unit_name"] = adUnitName
adx["ad_format"] = adFormat
adx["value"] = revenue
adx["currency"] = currency
val adPartners = mapOf("adx" to adx)
event.action = adUnitName
event.label = adFormat
event.value = revenue
event.semanticAttributes = mutableMapOf(
"adPartners" to adPartners,
"currency" to currency
)
Airbridge.trackEvent(event)
}
})
rewardedAd.setOnPaidEventListener(new OnPaidEventListener() {
@Override
public void onPaidEvent(double ecpm) {
double revenue = ecpm / 1000;
String adPlatform = "AD(X)";
String adUnitName = "ADX Rewarded Ad";
String adFormat = "RewardedAd";
String currency = "USD";
Event event = Event("airbridge.adImpression");
Map<String, Object> adx = new HashMap<>();
adx.put("ad_platform", adPlatform);
adx.put("ad_unit_name", adUnitName);
adx.put("ad_format", adFormat);
adx.put("value", revenue);
adx.put("currency", currency);
Map<String, Object> adPartners = new HashMap<>();
adPartners.put("adx", adx);
Map<String, Object> semanticAttributes = new HashMap<>();
semanticAttributes.put("adPartners", adPartners);
semanticAttributes.put("currency", currency);
event.setAction(adUnitName);
event.setLabel(adFormat);
event.setValue(revenue);
event.setSemanticAttributes(semanticAttributes);
Airbridge.trackEvent(event);
}
});
도움이 되었나요?