Skip to content

Latest commit

 

History

History
139 lines (88 loc) · 3.25 KB

README.md

File metadata and controls

139 lines (88 loc) · 3.25 KB

TOP >  Mediation Adapter


MediationAdapter

The module MediationAdapter is a SDK to serve ad with other SDK product through the mediation feature. Currently we support the ad banner feature of GoogleAdsMobile SDK.


How to Use

Prepare GoogleAdsMobile SDK

Admob ad Unit

Get the ad Unit ID ready from the market side and follow the introduction to implement the GADBanner in the App.

Enable mediation configurations in Admob console.

Ask market side to enable the configuration of the Admob Mediation. The following 2 steps must be done.

  1. set up a mediation group

  2. add ad custom event and map it with class name GADMediationAdapterRunaCustomEvent as the ad source.

Implement RUNAMediationAdapter

  • CocoaPods Edit the Podfile to contains the following configuration if using Cocoapods.
source "https://github.com/rakuten-ads/Rakuten-Ads-iOS"

pod 'RUNA/MediationAdapter'

Add repository URL of https://github.com/rakuten-ads/Rakuten-Ads-iOS in Xcode, and add package RUNAMediationAdapter to the target project.

MediationAdapter has been supported from RUNA SDK version 1.16.0.

The RUNAMediationAdapter SDK dependents on GoogleAdsMobile SDK, but since the SPM is not recommended by GoogleAdsMobile currently, RUNAMediationAdapter doesn't strict the dependency relation in the declare file while let developers to decide the method to import GoogleAdsMobile SDK.

Configure RUNA essential parameters

Configure the essential parameters in the class RUNAAdParameter for RUNABanner and register it to GAD by GADAdNetworkExtras protocol.

// set parameters for RUNA
var parameters = RUNAAdParameter()
parameters.adSpotId = "00000"
let extras = GADMediationAdapterRunaExtras()
extras.adParameter = parameters

// register the GADAdNetworkExtras before loading ad
req.register(extras)

current supported parameters

  • adSpotId
  • adSpotCode
  • adSpotBranchId
  • rz
  • rp
  • easyId
  • rpoint
  • customTargeting
  • genre

Details of the values can be found in Banner Ad

Samples

Normal case

Language

// create GADRequest
let req = GADRequest()

// set parameters for RUNA
var parameters = RUNAAdParameter()
parameters.adSpotId = "00000"
let extras = GADMediationAdapterRunaExtras()
extras.adParameter = parameters

// register the GADAdNetworkExtras
req.register(extras)

// GADBannerView load
bannerView.load(req)

Case of complex banner configuration

Language

// create GADRequest
let req = GADRequest()

// set parameters for RUNA
var parameters = RUNAAdParameter()
parameters.adSpotId = "00000"
parameters.rz = "rzcookie"
let extras = GADMediationAdapterRunaExtras()
extras.adParameter = parameters

// register the GADAdNetworkExtras
req.register(extras)

// GADBannerView load
bannerView.load(req)

TOP


LANGUAGE :

ja