Custom events let you set up waterfall mediation for an ad source that isn't a supported ad source. First, you'll need to implement a custom event adapter for the ad source you want to integrate. Use the instructions for Android or iOS.
Then, add the custom event in your mediation group using the following steps:
- Sign in to your AdMob account at https://apps.admob.com.
- Click Mediation in the sidebar.
- Click the Waterfall sources tab.
- Click Set up ad source.
- Click Add custom event.
- Click Add mapping. To include multiple custom events, you’ll need to set up additional mappings.
- Add the mapping details, including a mapping name. Enter a class name (required) and a parameter (optional) for each ad unit. Typically, the optional parameter contains an identifier that will be used by the custom event to load ads.
Note: If your class is implemented in Swift, you need to prefix the class name with the name of its app/framework module (for example,
appName.className
). - Click Save.
- Use the Google Developers guide for Android or iOS to implement your custom events in your app. Make sure to use the same name, classes, and parameters you used to create it in AdMob. If you don't complete this step, your custom events won't be able to fill incoming ad requests.
Add your custom event to a mediation group
After you’ve finished setting up your custom event, you’re ready to add it to a mediation group. Learn how to create a new mediation group or follow the instructions below to add your ad source to an existing mediation group:
- Sign in to your AdMob account at https://apps.admob.com.
- Click Mediation in the sidebar.
- In the Mediation group tab, click the name of the mediation group to which you're adding the ad source.
- In the Waterfall ad sources table, click Add custom event.
- Enter a descriptive label for the event.
- Enter a manual eCPM to use for this custom event. The eCPM will be used to dynamically position the event in the mediation waterfall where it will compete with other ad sources to fill ad requests. Additionally, the eCPM will be factored into estimated earnings in the Ads Activity report and LTV metrics in the Cohort report.
- Click Continue.
- Select an existing mapping to use for this custom event or click Add mapping to set up a new mapping. To use multiple custom events, you’ll have to create an additional mapping for each custom event.
- Click Done.
- Click Save. The mediation group will be saved.