Google DFP¶
The Pulse iD platform can also serve real-time ads with dynamic creative optimization using Google DFP.
This capability only works when an app is in foreground mode (i.e. when the app is open).
Follow these instructions to integrate DFP:
-
Setup Google DFP SDK as Google's instructions. Refer to Google DFP Quickstart.
-
Enable DFP feature on your app using the Pulse Platform.
-
Set up a campaign and copy its tag into your Google DFP ad serving setup
-
Finally, add the
getDFPTags
method to Google AdMob’scustomTargeting
method. For example :
//declare the ad banner and assign it the unit ID
self.bannerView.adUnitID = @"/<yourDFPAccount>/<Your_DCO_Banner>";
self.bannerView.rootViewController = self;
//add GADBannerViewDelegate in the view controller class
self.bannerView.delegate = self;
DFPRequest *request = [DFPRequest request];
// Notify DFP using custom parameters to load Pulse Creative
request.customTargeting = [[PulseSDK sharedClient] getDFPTags];
//declare the ad banner and assign it the unit ID
bannerView.adUnitID = "/<yourDFPAccount>/<Your_DCO_Banner>"
bannerView.rootViewController = self
//make the view controller class the GADBannerViewDelegate
bannerView.delegate = self
var request:DFPRequest = DFPRequest()
// Notify DFP using custom parameters to load Pulse Creative
request.customTargeting = PulseSDK.sharedClient().getDFPTags() as! [String: String]