Integrating DFP and MoPub for Header-bidding using Cocoapods
Please go through the Getting Started Guide for integrating Media.net SDK. Once the SDK is initialized, it is automatically enabled for Header Bidding. It works by overriding DFP call and automatically adding bids to the DFP call. This can be turned on/off from the server side.
No code integrations or additional dependencies are needed.
Check the Header Bidding SDK version support for different SDKs. The minimum version of the following SDKs need to be installed to your project before you can start with the Header Bidder integration.
- Google-Mobile-Ads-SDK 7.x.x
- mopub-ios-sdk 4.x.x
Passing content-link into DFP Header Bidder
Context-link can be sent into the DFPRequest
object by setting the contentURL
property, which will be picked up by the MNet ad-views to contextualize the ads.
NOTE: this process is equivalent in both Banner and Interstitial ads since the DFPRequest
object is the same.
Objective-C
DFPRequest *request = [DFPRequest request];
// Setting the custom contentUrl
[request setContentURL:@"https://my-custom-link.com/contentURL"];
Swift
let request:DFPRequest = DFPRequest.init()
// Setting the custom contentUrl
request.contentURL = "https://my-custom-link.com/contentURL"