Note
This feature is currently in beta. If you have any questions or suggestions for improvements, reach out to your Airbridge CSM. If you don't have a dedicated CSM, contact us through the Airbridge Help Center.
Airbridge supports server-to-server (S2S) and SDK integration with AppLovin MAX. With the integration, you can import the ad revenue into Airbridge.
Recommended integration method
We recommend implementing both S2S integration and SDK integration for more accurate measurement.
Make sure to check the version of the SDK you installed before implementing both S2S integration and SDK integration. You must have a certain version or later of the installed SDK to set up all integrations properly. If your SDK version is earlier than the required version, the user count will not be accurately aggregated after integration.
Airbridge automatically updates the data received through SDK integration in real-time with the enriched data received through S2S integration. The data received through SDK integration can also be used to set up SKAN conversion values.
Check the Airbridge SDK version installed in the app. If it is earlier than the versions listed below, proceed with only S2S integration or SDK integration.
Attention
If you want to proceed with both S2S and SDK integrations, make sure the Airbridge SDK version installed in the app meets the requirements.
It is advised to proceed with the integrations once a sufficient number of users have updated their app to the version with the required Airbridge SDK version. If most of your users still have the app with the Airbridge SDK version earlier than the required version, the user count may not be accurately aggregated in Airbridge.
Android SDK 2.25.0
React Native SDK 2.8.6
Flutter SDK 3.5.6
Cordova SDK 2.6.6
Expo SDK 2.6.6
Unity SDK 1.14.5
Unreal SDK 1.3.5
Click the link below and install the AppLovin MAX SDK.
Unity SDK install guide of AppLovin MAX
iOS SDK install guide of AppLovin MAX
Android SDK install guide of AppLovin MAX
React Native SDK install guide of AppLovin MAX
Configure the ad revenue data callback OnAdRevenuePaidEvent
to send the ad revenue data to the Airbridge SDK.
private void OnEnable()
{
MaxSdkCallbacks.Banner.OnAdRevenuePaidEvent += OnAdRevenuePaidEvent;
MaxSdkCallbacks.Interstitial.OnAdRevenuePaidEvent += OnAdRevenuePaidEvent;
MaxSdkCallbacks.Rewarded.OnAdRevenuePaidEvent += OnAdRevenuePaidEvent;
MaxSdkCallbacks.RewardedInterstitial.OnAdRevenuePaidEvent += OnAdRevenuePaidEvent;
MaxSdkCallbacks.MRec.OnAdRevenuePaidEvent += OnAdRevenuePaidEvent;
}
private void OnAdRevenuePaidEvent(string adUnitId, MaxSdkBase.AdInfo adInfo)
{
if (adInfo == null) {
return;
}
Airbridge.TrackEvent(
category: AirbridgeCategory.AD_IMPRESSION,
semanticAttributes: new Dictionary<string, object>()
{
{ AirbridgeAttribute.ACTION, adInfo.NetworkName },
{ AirbridgeAttribute.LABEL, adInfo.NetworkPlacement },
{ AirbridgeAttribute.VALUE, adInfo.Revenue },
{ AirbridgeAttribute.CURRENCY, "USD" },
{
AirbridgeAttribute.AD_PARTNERS, new Dictionary<string, object>()
{
{
"appLovin", new Dictionary<string, object>()
{
{ "revenue", adInfo.Revenue },
{ "country_code", MaxSdk.GetSdkConfiguration().CountryCode },
{ "network_name", adInfo.NetworkName },
{ "network_placement", adInfo.NetworkPlacement },
{ "adunit_identifier", adInfo.AdUnitIdentifier },
{ "creative_identifier", adInfo.CreativeIdentifier },
{ "placement", adInfo.Placement }
}
}
}
},
}
);
}
private void OnEnable()
{
MaxSdkCallbacks.Banner.OnAdRevenuePaidEvent += OnAdRevenuePaidEvent;
MaxSdkCallbacks.Interstitial.OnAdRevenuePaidEvent += OnAdRevenuePaidEvent;
MaxSdkCallbacks.Rewarded.OnAdRevenuePaidEvent += OnAdRevenuePaidEvent;
MaxSdkCallbacks.RewardedInterstitial.OnAdRevenuePaidEvent += OnAdRevenuePaidEvent;
MaxSdkCallbacks.MRec.OnAdRevenuePaidEvent += OnAdRevenuePaidEvent;
}
private void OnAdRevenuePaidEvent(string adUnitId, MaxSdkBase.AdInfo adInfo)
{
if (adInfo != null) {
AirbridgeEvent @event = new AirbridgeEvent("airbridge.adImpression");
var appLovin = new Dictionary<string, object>();
appLovin["revenue"] = adInfo.Revenue;
appLovin["country_code"] = MaxSdk.GetSdkConfiguration().CountryCode;
appLovin["network_name"] = adInfo.NetworkName;
appLovin["network_placement"] = adInfo.NetworkPlacement;
appLovin["adunit_identifier"] = adInfo.AdUnitIdentifier;
appLovin["creative_identifier"] = adInfo.CreativeIdentifier;
appLovin["placement"] = adInfo.Placement;
var adPartners = new Dictionary<string, object>();
adPartners["appLovin"] = appLovin;
@event.SetAction(adInfo.NetworkName);
@event.SetLabel(adInfo.NetworkPlacement);
@event.SetValue(adInfo.Revenue);
@event.AddSemanticAttribute("adPartners", adPartners);
// AppLovin MAX has a default currency of USD
@event.AddSemanticAttribute("currency", "USD");
AirbridgeUnity.TrackEvent(@event);
}
}
class ExampleViewController : UIViewController {
func createNativeAdLoader() {
nativeAdLoader?.revenueDelegate = self;
}
}
extension ExampleViewController: MAAdRevenueDelegate {
func didPayRevenue(for ad: MAAd) {
Airbridge.trackEvent(
category: AirbridgeCategory.AD_IMPRESSION,
semanticAttributes: [
AirbridgeAttribute.ACTION: ad.networkName,
AirbridgeAttribute.LABEL: ad.networkPlacement,
AirbridgeAttribute.VALUE: ad.revenue,
AirbridgeAttribute.AD_PARTNERS: [
"appLovin": [
"revenue": ad.revenue,
"country_code": ALSdk.shared().configuration.countryCode,
"network_name": ad.networkName,
"network_placement": ad.networkPlacement,
"adunit_identifier": ad.adUnitIdentifier,
"creative_identifier": ad.creativeIdentifier,
"placement": ad.placement
]
],
AirbridgeAttribute.CURRENCY: "USD"
]
)
}
}
@implementation ExampleViewController
- (void)createNativeAdLoader {
self.nativeAdLoader.revenueDelegate = self;
}
- (void)didPayRevenueForAd:(MAAd *)ad {
[Airbridge trackEventWithCategory:AirbridgeCategory.AD_IMPRESSION semanticAttributes:@{
AirbridgeAttribute.ACTION: ad.networkName,
AirbridgeAttribute.LABEL: ad.networkPlacement,
AirbridgeAttribute.VALUE: @(ad.revenue),
AirbridgeAttribute.AD_PARTNERS: @{
@"appLovin": @{
@"revenue": @(ad.revenue),
@"country_code": [ALSdk shared].configuration.countryCode,
@"network_name": ad.networkName,
@"network_placement": ad.networkPlacement,
@"adunit_identifier": ad.adUnitIdentifier,
@"creative_identifier": ad.creativeIdentifier,
@"placement": ad.placement
}
},
AirbridgeAttribute.CURRENCY: @"USD"
}];
}
class ExampleViewController : UIViewController {
func createNativeAdLoader() {
nativeAdLoader?.revenueDelegate = self
}
}
extension ExampleViewController: MAAdRevenueDelegate {
func didPayRevenue(for ad: MAAd) {
let event = ABInAppEvent()
event?.setCategory("airbridge.adImpression")
event?.setAction(ad.networkName)
event?.setLabel(ad.networkPlacement)
event?.setValue(ad.revenue)
event?.setSemantics([
"adPartners": [
"appLovin": [
"revenue": ad.revenue,
"country_code": ALSdk.shared().configuration.countryCode,
"network_name": ad.networkName,
"network_placement": ad.networkPlacement,
"adunit_identifier": ad.adUnitIdentifier,
"creative_identifier": ad.creativeIdentifier,
"placement": ad.placement
]
],
"currency": "USD"
])
event?.send()
}
}
@implementation ExampleViewController
- (void)createNativeAdLoader {
self.nativeAdLoader.revenueDelegate = self;
}
- (void)didPayRevenueForAd:(MAAd *)ad {
ABInAppEvent* event = [[ABInAppEvent alloc] init];
[event setCategory:@"airbridge.adImpression"];
[event setAction:ad.networkName];
[event setLabel:ad.networkPlacement];
[event setValue:ad.revenue];
[event setSemantics:@{
@"adPartners": @{
@"appLovin": @{
@"revenue": @(ad.revenue),
@"country_code": [ALSdk shared].configuration.countryCode,
@"network_name": ad.networkName,
@"network_placement": ad.networkPlacement,
@"adunit_identifier": ad.adUnitIdentifier,
@"creative_identifier": ad.creativeIdentifier,
@"placement": ad.placement
}
},
@"currency": @"USD"
}];
[event send];
}
override fun onAdRevenuePaid(maxAd: MaxAd) {
Airbridge.trackEvent(
AirbridgeCategory.AD_IMPRESSION,
mapOf(
AirbridgeAttribute.ACTION to maxAd.networkName,
AirbridgeAttribute.LABEL to maxAd.networkPlacement,
AirbridgeAttribute.VALUE to maxAd.revenue,
AirbridgeAttribute.AD_PARTNERS to mapOf(
"appLovin" to mapOf(
"revenue" to maxAd.revenue,
"country_code" to AppLovinSdk.getInstance(this).configuration.countryCode,
"network_name" to maxAd.networkName,
"network_placement" to maxAd.networkPlacement,
"adunit_identifier" to maxAd.adUnitId,
"creative_identifier" to maxAd.creativeId,
"placement" to maxAd.placement
)
),
// AppLovin MAX has a default currency of USD
AirbridgeAttribute.CURRENCY to "USD"
)
)
}
@Override
public void onAdRevenuePaid(final MaxAd maxAd) {
String countryCode = AppLovinSdk.getInstance(this).getConfiguration().getCountryCode();
Airbridge.trackEvent(
AirbridgeCategory.AD_IMPRESSION,
new HashMap<String, Object>() {{
put(AirbridgeAttribute.ACTION, maxAd.getNetworkName());
put(AirbridgeAttribute.LABEL, maxAd.getNetworkPlacement());
put(AirbridgeAttribute.VALUE, maxAd.getRevenue());
put(AirbridgeAttribute.AD_PARTNERS, new HashMap<String, Object>() {{
put("appLovin", new HashMap<String, Object>() {{
put("revenue", maxAd.getRevenue());
put("country_code", countryCode);
put("network_name", maxAd.getNetworkName());
put("network_placement", maxAd.getNetworkPlacement());
put("adunit_identifier", maxAd.getAdUnitId());
put("creative_identifier", maxAd.getCreativeId());
put("placement", maxAd.getPlacement());
}});
}});
// AppLovin MAX has a default currency of USD
put(AirbridgeAttribute.CURRENCY, "USD");
}}
);
}
override fun onAdRevenuePaid(ad: MaxAd) {
val event = Event("airbridge.adImpression")
val appLovin = mutableMapOf<String, Any?>()
appLovin["revenue"] = ad.revenue
appLovin["country_code"] = AppLovinSdk.getInstance(this).configuration.countryCode
appLovin["network_name"] = ad.networkName
appLovin["network_placement"] = ad.networkPlacement
appLovin["adunit_identifier"] = ad.adUnitId
appLovin["creative_identifier"] = ad.creativeId
appLovin["placement"] = ad.placement
val adPartners = mapOf("appLovin" to appLovin)
event.action = ad.networkName
event.label = ad.networkPlacement
event.value = ad.revenue
event.semanticAttributes = mutableMapOf(
"adPartners" to adPartners,
// AppLovin MAX has a default currency of USD
"currency" to "USD"
)
Airbridge.trackEvent(event)
}
@Override
public void onAdRevenuePaid(final MaxAd maxAd)
{
Event event = new Event("airbridge.adImpression");
Map<String, Object> appLovin = new HashMap<>();
appLovin.put("revenue", maxAd.getRevenue());
appLovin.put("country_code", AppLovinSdk.getInstance(this).getConfiguration().getCountryCode());
appLovin.put("network_name", maxAd.getNetworkName());
appLovin.put("network_placement", maxAd.getNetworkPlacement());
appLovin.put("adunit_identifier", maxAd.getAdUnitId());
appLovin.put("creative_identifier", maxAd.getCreativeId());
appLovin.put("placement", maxAd.getPlacement());
Map<String, Object> adPartners = new HashMap<>();
adPartners.put("appLovin", appLovin);
Map<String, Object> semanticAttributes = new HashMap<>();
semanticAttributes.put("adPartners", adPartners);
// AppLovin MAX has a default currency of USD
semanticAttributes.put("currency", "USD");
event.setAction(maxAd.getNetworkName());
event.setLabel(maxAd.getNetworkPlacement());
event.setValue(maxAd.getRevenue());
event.setSemanticAttributes(semanticAttributes);
Airbridge.trackEvent(event);
}
function App(): JSX.Element {
useEffect(() => {
// Helper function to add an ad revenue paid listener
const addAdRevenuePaidListener = (AdClass) => {
AdClass.addAdRevenuePaidListener(adInfo => {
if (adInfo) {
onAdRevenuePaidEvent(adInfo);
}
});
};
// Set up event listeners
[BannerAd, InterstitialAd, RewardedAd, AppOpenAd, MRecAd].forEach(addAdRevenuePaidListener);
}, []);
const onAdRevenuePaidEvent = (adInfo: AdRevenueInfo) => {
Airbridge.trackEvent(
AirbridgeCategory.AD_IMPRESSION, {
[AirbridgeAttribute.ACTION]: adInfo.networkName,
[AirbridgeAttribute.LABEL]: adInfo.networkPlacement,
[AirbridgeAttribute.VALUE]: adInfo.revenue,
[AirbridgeAttribute.AD_PARTNERS]: {
'appLovin': {
'revenue': adInfo.revenue,
'country_code': adInfo.countryCode,
'network_name': adInfo.networkName,
'network_placement': adInfo.networkPlacement,
'adunit_identifier': adInfo.adUnitId,
'creative_identifier': adInfo.creativeId,
'placement': adInfo.placement
}
},
[AirbridgeAttribute.CURRENCY]: 'USD',
}
);
};
return ({
/* Your JSX goes here */
});
}
function App(): JSX.Element {
useEffect(() => {
// Helper function to add an ad revenue paid listener
const addAdRevenuePaidListener = (AdClass) => {
AdClass.addAdRevenuePaidListener(adInfo => {
if (adInfo) {
onAdRevenuePaidEvent(adInfo);
}
});
};
// Set up event listeners
[BannerAd, InterstitialAd, RewardedAd, AppOpenAd, MRecAd].forEach(addAdRevenuePaidListener);
}, []);
const onAdRevenuePaidEvent = (adInfo: AdRevenueInfo) => {
const airbridgeSemanticAttributes = {
adPartners: {
appLovin: {
revenue: adInfo.revenue,
country_code: adInfo.countryCode,
network_name: adInfo.networkName,
network_placement: adInfo.networkPlacement,
adunit_identifier: adInfo.adUnitId,
creative_identifier: adInfo.creativeId,
placement: adInfo.placement,
},
},
currency: 'USD', // Assuming USD as default
}
Airbridge.trackEvent('airbridge.adImpression', {
action: adInfo.networkName,
label: adInfo.networkPlacement,
value: adInfo.revenue,
semanticAttributes: airbridgeSemanticAttributes
});
};
return ({
/* Your JSX goes here */
});
}
To implement the S2S integration, you need to enter the Report Key provided by AppLovin MAX into the Airbridge dashboard.
For more detailed instructions, refer to the article below.
Was this page helpful?