Mars SDK - AppLovin AdOps

Create Custom Network

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:

  • Custom Network Name - Mars Custom Network.
  • iOS Adapter Class Name - MediafyAppLovinAdapter.
  • Android / Fire OS Adapter Class Name - com.mediafy.sdk.applovin.MediafyAppLovinMediationAdapter.

Add Placements to Ad units

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.

Configure Mars Placements

The Placement requires three parameters parameters:

  • Placement ID - the name of the placement.
  • CPM Price - price for this custom network.
  • Custom parameter - custom JSON parameter with configuration. It differs for different ad formats (banner, interstitial, native).

Placement configuration: banner

JSON parameter for the banner adapter should contain the following fields:

  • ad_formats - ad format (by default "banner").
  • ad_unit_id (optional) - Mars 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"
}

Placement configuration: interstitial

JSON parameter for the interstitial adapter should contain the following fields:

  • ad_formats - ad formats.
  • sizes - ad sizes.
  • ad_unit_id (optional) - Mars ad unit id.

Ensure you provide sizes for your ad unit in code or via settings on the publisher's UI. It's a critical property.

Example: Custom placement parameter for banner:

{
  "ad_formats": [
    "banner"
  ],
  "sizes": [
    {
      "w": 320,
      "h": 480
    }
  ],
  "ad_unit_id": "test_ad_unit_id"
}

Example: Custom placement parameter for video:

{
  "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"
}

Placement configuration: native

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:

  • ad_unit_id (optional) - Mars ad unit id.

Example: Custom placement parameter for native:

{
  "ad_unit_id": "test"
}

Contact us today

to enjoy endless opportunities!

Contact Us
+

Contact Us