Add a custom event
You can allocate traffic to custom events just as you would to ad networks, and the custom events will fill ad requests from your users. However, custom events don't call an ad network's SDK for an ad. Instead, they call custom code in your app. You name the event and define the classes and parameters in your app code, then map them to the custom event and ad units in a mediation group.
Complete the following steps to create a new custom event:
- Sign in to your AdMob account at https://apps.admob.com.
- Click Mediation in the sidebar.
- Click the name of the mediation group.
- Click Add custom event in the Waterfall ad sources table.
- 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 chain where it will compete with other ad sources to fill ad requests.
- Click Continue.
- Enter a class name (required) and a parameter (optional) for each ad unit.
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,
- Click Done.
- Click Save. The mediation group will be saved.
- If you haven't already implemented the custom event in your app's code, do so now using the same name, classes, and parameters you used to create it in AdMob.