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 designated CSM, contact 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 initially installed before implementing both S2S integration and SDK integration. You must have a certain version or later of the initially installed SDK to set up all integrations properly. If your SDK version is earlier than the required version, the number of users may not be accurately counted after integration.
Airbridge automatically updates the data received in real-time through SDK integration with the enriched data received through S2S integration. Also, the data received through SDK integration can be used for SKAN conversion value setup.
Click the link below and install the AppLovin MAX SDK.
Unity 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) {
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);
}
}
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 */
);
}
public class InterstitialAdActivity
extends BaseAdActivity
implements MaxAdListener, MaxAdRevenueListener
{
@Override
protected void onCreate(Bundle savedInstanceState)
{
...
// Set up event listener
interstitialAd.setRevenueListener(this);
...
}
@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);
}
}
class InterstitialAdActivity : BaseAdActivity(),
MaxAdListener, MaxAdRevenueListener {
override fun onCreate(savedInstanceState: Bundle?) {
...
// Set up event listener
interstitialAd.setRevenueListener(this)
...
}
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)
}
}
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?