To incorporate the Mars SDK into your AppLovin monetization setup, enable the Mars SDK ad network and add it to the appropriate ad units.
Open AppLovin MAX Networks page.
Scroll down and click "Click here to add a Custom Network".
Set fields:
Mars Custom Network
MediafyAppLovinAdapter
com.mediafy.sdk.applovin.MediafyAppLovinMediationAdapter
Go to "Ad Units".
Find the ad unit you want to apply the Mars adapter to.
Activate Custom Network Mars Custom Network. Fill custom event fields for the current ad format (look at the following section, "Custom event fields," for the details).
Save ad unit. Changes will be applied in an hour.
The Placement requires three parameters parameters:
JSON parameter for the banner adapter should contain the following fields:
ad_formats
ad_unit_id
Example: Custom placement parameter for banner:
{ "ad_formats": [ "banner" ], "ad_unit_id": "test_ad_unit_id" }
Example: Custom placement parameter for video:
{ "ad_formats": [ "video" ], "ad_unit_id": "test_ad_unit_id" }
JSON parameter for the interstitial adapter should contain the following fields:
sizes
Ensure you provide sizes for your ad unit in code or via settings on the publisher's UI. It's a critical property.
{ "ad_formats": [ "banner" ], "sizes": [ { "w": 320, "h": 480 } ], "ad_unit_id": "test_ad_unit_id" }
{ "ad_formats": [ "video" ], "sizes": [ { "w": 1024, "h": 768 } ], "ad_unit_id": "test_ad_unit_id" }
Example: Custom placement parameter for multiformat interstitial - banner and video: It will request the ad with display or video response with sizes 1024x768 and 320x480.
{ "ad_formats": [ "banner", "video" ], "sizes": [ { "w": 1024, "h": 768 }, { "w": 320, "h": 480 } ], "ad_unit_id": "test_ad_unit_id" }
Important: AppLovin Ad Unit must be "Manual" type. Or native ad will not be rendered correctly.
JSON parameter for the native adapter should contain the following fields:
Example: Custom placement parameter for native:
{ "ad_unit_id": "test" }