This guide helps you to configure the AdMob account to add Mediafy as a Monetization partner.
This step is optional if you already have an ad unit that you want to monetize with Mars.
Sign in to your AdMob account at https://apps.admob.com. Create an app if you haven't done this already. Click Apps and then Add app.
Apps
Add app
Choose platform and whether your app is listed on a supported app store.
Add app name and click Add app.
Create an ad unit. To do this, select your app from the app list, click onAd units and then on Get started.
Ad units
Get started
Choose the type of ad unit and click Select.
Select
Fill Ad unit name and tune other settings if needed. Click Create ad unit.
Ad unit name
Create ad unit
To add Mars to the waterfall, you need to create a custom event in your AdMob account and then add this event to the respective mediation groups.
To create a Mars custom event, follow the instructions:
Create a mediation group.
Select ad format and platform.
Fill the Name field. Click Add ad units.
Name
Add ad units
Select ad units and click Done.
Done
Locate the Waterfall section and click Add custom event.
Waterfall
Add custom event
Fill the Label field and Manual eCPM ($ USD). Click Continue.
Label
Manual eCPM ($ USD)
Continue
Click Add mapping.
Add mapping
The custom event requires filling three parameters:
MediafyGADMediationAdapter
Click Done.
Click Select a mapping. Select an appropriate mapping from the list.
Select a mapping
Click Save.
Save
You can provide custom parameters via the Parameter field during custom event setup. For that, you should pass a valid JSON structure with the desired values.
Parameter
banner
video
["banner", "video"]
imp[].ext.mediafy.adunitid
"56maxa"
w
h
[{ "w": 320,"h": 480},{"w": 1024,"h": 768}]
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": 300, "h": 250 } ], "ad_unit_id": "56maxa" }
{ "ad_formats": [ "video" ], "sizes": [ { "w": 300, "h": 250 } ], "ad_unit_id": "56maxa" }
{ "ad_formats": [ "banner" ], "sizes": [ { "w": 300, "h": 250 }, { "w": 320, "h": 50 } ], "ad_unit_id": "56maxa" }
{ "ad_formats": [ "banner" ], "sizes": [ { "w": 320, "h": 480 }, { "w": 1024, "h": 768 } ], "ad_unit_id": "56maxa" }
{ "ad_formats": [ "video" ], "sizes": [ { "w": 320, "h": 480 }, { "w": 1024, "h": 768 } ], "ad_unit_id": "56maxa" }
{ "ad_formats": [ "banner", "video" ], "sizes": [ { "w": 320, "h": 480 } ], "ad_unit_id": "56maxa" }
{ "ad_formats": [ "banner", "video" ], "sizes": [ { "w": 320, "h": 480 }, { "w": 1024, "h": 768 } ], "ad_unit_id": "56maxa" }