This guide shows you how to use the Google Mobile Ads SDK to load and display ads from DT Exchange using mediation, covering waterfall integrations. It covers how to add DT Exchange to an ad unit's mediation configuration and how to integrate the DT Exchange SDK and adapter into an iOS app.
Supported integrations and ad formats
The AdMob mediation adapter for DT Exchange has the following capabilities:
Integration | |
---|---|
Bidding | |
Waterfall | |
Formats | |
Banner | |
Interstitial | |
Rewarded | |
Native |
Requirements
- iOS deployment target of 10.0 or higher
- Latest Google Mobile Ads SDK
Step 1: Set up DT Exchange
Add new app and ad placement
Sign up or log in to DT Exchange Console.
Click on the Add App button to add your app.
Select iOS under Platform, fill out the rest of the form, and click Add Placements.
Enter a name for the new placement in the field labeled Name your Placement and select your desired Placement Type from the dropdown list. Finally, click Save Placement.
App ID and Placement ID
Open the left navigation bar by hovering your mouse over it. Then click Apps from the left menu.
On the App Management page, take note of the App ID next to your app.
Select your app, navigate to the Placements tab, and click on the copy icon next to Placement Name. Take note of the Placement ID.
Publisher ID, Consumer Key and Consumer Secret
Click on your username from the left menu and select User Profile.
Take note of the Publisher ID, Consumer Key, and Consumer Secret as these are needed in the next step.
Step 2: Configure mediation settings for your AdMob ad unit
You need to add DT Exchange to the mediation configuration for your ad unit.
First, sign in to your AdMob account. Next, navigate to the Mediation tab. If you have an existing mediation group you'd like to modify, click the name of that mediation group to edit it and skip ahead to Add DT Exchange as an ad source.
To create a new mediation group, select Create Mediation Group.
Enter your ad format and platform, then click Continue.

Give your mediation group a name, and select locations to target. Next, set the mediation group status to Enabled and click Add Ad Units.

Associate this mediation group with one or more of your existing AdMob ad units. Then click Done.

You should now see the ad units card populated with the ad units you selected.

Add DT Exchange as an ad source
In the Waterfall card, select Add Ad Source.
Select DT Exchange and it should take you to Add ad source: DT Exchange
Enable the Optimize switch. Then, enter the Publisher ID, Consumer Key, and Consumer Secret obtained in the previous section.
Review and check the Authorization checkbox to set up ad source optimization for DT Exchange. Enter an eCPM value for DT Exchange and click Continue.
Enter the Application ID and Placement ID obtained in the previous section and click Done.
Rewarded ads
In the settings for your rewarded ad unit, provide values for the reward amount and reward type. To provide the same reward to the user no matter which ad network is served, select the Apply to all networks in Mediation groups box.
If you don't apply this setting, the DT Exchange adapter passes back the reward specified in the DT Exchange dashboard when creating the placement.
For more information on setting reward values for AdMob ad units, see Create an ad unit.
Step 3: Import the DT Exchange SDK and adapter
Using CocoaPods (recommended)
Add the following line to your project's Podfile:
pod 'GoogleMobileAdsMediationFyber'
From the command line run:
pod install --repo-update
Manual integration
- Download the latest version of the
DT Exchange SDK for iOS
and link the following frameworks to your project:
IASDKCore.framework
IASDKMRAID.framework
IASDKVideo.framework
- Download the latest version of the DT Exchange adapter from the download
link in Changelog and link
FyberAdapter.framework
in your project. - Add the following frameworks to your project:
libxml2.2.tbd
Optional steps
EU Consent and GDPR
Under the Google EU User Consent Policy, you must ensure that certain disclosures are given to, and consents obtained from, users in the European Economic Area (EEA) regarding the use of device identifiers and personal data. This policy reflects the requirements of the EU ePrivacy Directive and the General Data Protection Regulation (GDPR). When seeking consent, you must identify each ad network in your mediation chain that may collect, receive, or use personal data and provide information about each network's use. Google currently is unable to pass the user's consent choice to such networks automatically.
DT Exchange contains an API that lets you forward user consent to their SDK. The following sample code shows how to pass consent information to the DT Exchange SDK manually. Should you choose to pass consent information to the DT Exchange SDK manually, it is recommended that this code is called prior to requesting ads through the Google Mobile Ads SDK.
Swift
import IASDKCore
// ...
IASDKCore.sharedInstance().gdprConsent = IAGDPRConsentType.given
IASDKCore.sharedInstance().gdprConsentString = "myGdprConsentString"
Objective-C
#import <IASDKCore/IASDKCore.h>
// ...
[IASDKCore.sharedInstance setGDPRConsent:YES];
[IASDKCore.sharedInstance setGDPRConsentString:@"myGdprConsentString"];
Visit DT Exchange's GDPR Resource Page and their GDPR implementation guide for more details and the values that may be provided in the method.
Add DT Exchange to GDPR ad partners list
Follow the steps in GDPR settings to add DT Exchange to the GDPR ad partners list in the AdMob UI.
CCPA
The California Consumer Privacy Act (CCPA) requires giving California state residents the right to opt out of the "sale" of their "personal information" (as the law defines those terms), with the opt-out offered via a prominent "Do Not Sell My Personal Information" link on the "selling" party's homepage. The CCPA preparation guide offers the ability to enable restricted data processing for Google ad serving, but Google is unable to apply this setting to each ad network in your mediation chain. Therefore, you must identify each ad network in your mediation chain that may participate in the sale of personal information and follow guidance from each of those networks to ensure compliance with CCPA.
DT Exchange contains an API that lets you forward user consent to their SDK. The following sample code shows how to pass consent information to the DT Exchange SDK manually. Should you choose to pass consent information to the DT Exchange SDK manually, it is recommended that this code is called prior to requesting ads through the Google Mobile Ads SDK.
Swift
import IASDKCore
// ...
IASDKCore.sharedInstance().ccpaString = "myCCPAConsentString"
Objective-C
#import <IASDKCore/IASDKCore.h>
// ...
[IASDKCore.sharedInstance setCCPAString:@"myCCPAConsentString"];
Visit DT Exchange's CCPA Resource Page and their CCPA implementation guide for more details and the values that may be provided in the method.
Network-specific parameters
The DT Exchange adapter supports an additional parameter to pass the user data
as an IAUserData
object to the DT Exchange SDK.
Here's a code example of how to set this parameter:
Swift
let userData = IAUserData.build({ builder in
builder.age = 23
builder.gender = IAUserGenderType.male
builder.zipCode = "1234"
}];
let request = GADRequest()
let extras = GADMAdapterFyberExtras()
extras.userData = userData
request.register(extras)
Objective-C
IAUserData *userData = [IAUserData build:^(id<IAUserDataBuilder> _Nonnull builder) {
builder.age = 23;
builder.gender = IAUserGenderTypeMale;
builder.zipCode = @"1234";
}];
GADRequest *request = [GADRequest request];
GADMAdapterFyberExtras *extras = [[GADMAdapterFyberExtras alloc] init];
extras.userData = userData;
[request registerAdNetworkExtras:extras];
Consult the DT Exchange integration guide for more information.
Error codes
If the adapter fails to receive an ad from DT Exchange, you can check the
underlying error from the ad response using
GADResponseInfo.adNetworkInfoArray
under the following class:
GADMediationAdapterFyber
Here are the codes and accompanying messages thrown by the DT Exchange adapter when an ad fails to load:
Error code | Reason |
---|---|
0-10 | DT Exchange SDK returned an error. See documentation for more details. |
101 | DT Exchange server parameters configured in the AdMob UI are missing/invalid. |
102 | The requested ad size does not match a DT Exchange supported banner size. |
103 | Failed to show ad because ad object has already been used. |
104 | Failed to show DT Exchange ads due to ad not ready. |
105 | DT Exchange SDK returned an initialization error. |
DT Exchange iOS Mediation Adapter Changelog
Version 8.2.0.0
- Verified compatibility with DT Exchange SDK version 8.2.0.
Built and tested with:
- Google Mobile Ads SDK version 10.2.0.
- DT Exchange SDK version 8.2.0.
Version 8.1.9.1
- Now requires Google Mobile Ads SDK version 10.0.0 or higher.
Built and tested with:
- Google Mobile Ads SDK version 10.0.0.
- DT Exchange SDK version 8.1.9.
Version 8.1.9.0
- Removed use of deprecated gender, birthday and location mediation APIs.
- Verified compatibility with DT Exchange SDK version 8.1.9.
Built and tested with:
- Google Mobile Ads SDK version 9.14.0.
- DT Exchange SDK version 8.1.9.
Version 8.1.7.0
- Verified compatibility with DT Exchange SDK version 8.1.7.
- Adapter is rebranded to "DT Exchange".
Built and tested with:
- Google Mobile Ads SDK version 9.13.0.
- DT Exchange SDK version 8.1.7.
Version 8.1.6.0
- Added support for passing
muteAudio
extra inGADMAdapterFyberExtras
class. - Updated the adapter to use the
didRewardUser
API. - Now requires Google Mobile Ads SDK version 9.8.0 or higher.
- Verified compatibility with Fyber Marketplace SDK version 8.1.6.
Built and tested with:
- Google Mobile Ads SDK version 9.11.0.
- Fyber Marketplace SDK version 8.1.6.
Version 8.1.5.0
- Verified compatibility with Fyber Marketplace SDK version 8.1.5.
Built and tested with:
- Google Mobile Ads SDK version 9.5.0.
- Fyber Marketplace SDK version 8.1.5.
Version 8.1.4.0
- Verified compatibility with Fyber Marketplace SDK version 8.1.4.
- Added support for the arm64 simulator architecture.
Built and tested with:
- Google Mobile Ads SDK version 9.1.0.
- Fyber Marketplace SDK version 8.1.4.
Version 8.1.3.1
- Verified compatibility with Google Mobile Ads SDK version 9.0.0.
- Now requires Google Mobile Ads SDK version 9.0.0 or higher.
Built and tested with:
- Google Mobile Ads SDK version 9.0.0.
- Fyber Marketplace SDK version 8.1.3.
Version 8.1.3.0
- Verified compatibility with Fyber Marketplace SDK version 8.1.3.
Built and tested with:
- Google Mobile Ads SDK version 8.13.0.
- Fyber Marketplace SDK version 8.1.3.
Version 8.1.2.0
- Verified compatibility with Fyber Marketplace SDK version 8.1.2.
Built and tested with:
- Google Mobile Ads SDK version 8.13.0.
- Fyber Marketplace SDK version 8.1.2.
Version 8.1.1.0
- Verified compatibility with Fyber Marketplace SDK version 8.1.1.
Built and tested with:
- Google Mobile Ads SDK version 8.12.0.
- Fyber Marketplace SDK version 8.1.1.
Version 8.1.0.0
- Verified compatibility with Fyber Marketplace SDK version 8.1.0.
Built and tested with:
- Google Mobile Ads SDK version 8.12.0.
- Fyber Marketplace SDK version 8.1.0.
Version 8.0.0.0
- Verified compatibility with Fyber Marketplace SDK version 8.0.0.
Built and tested with:
- Google Mobile Ads SDK version 8.12.0.
- Fyber Marketplace SDK version 8.0.0.
Version 7.9.0.0
- Verified compatibility with Fyber Marketplace SDK version 7.9.0.
Built and tested with:
- Google Mobile Ads SDK version 8.11.0.
- Fyber Marketplace SDK version 7.9.0.
Version 7.8.9.0
- Verified compatibility with Fyber Marketplace SDK version 7.8.9.
Built and tested with:
- Google Mobile Ads SDK version 8.10.0.
- Fyber Marketplace SDK version 7.8.9.
Version 7.8.8.1
- Moved ad event
didEndVideo
to rewarded ad callbackIAAdDidReward
.
Built and tested with:
- Google Mobile Ads SDK version 8.9.0.
- Fyber Marketplace SDK version 7.8.8.
Version 7.8.8.0
- Now requires minimum iOS version 10.0.
- Verified compatibility with Fyber Marketplace SDK version 7.8.8.
Built and tested with:
- Google Mobile Ads SDK version 8.9.0.
- Fyber Marketplace SDK version 7.8.8.
Version 7.8.7.0
- Verified compatibility with Fyber Marketplace SDK version 7.8.7.
Built and tested with:
- Google Mobile Ads SDK version 8.8.0.
- Fyber Marketplace SDK version 7.8.7.
Version 7.8.6.0
- Verified compatibility with Fyber Marketplace SDK version 7.8.6.
Built and tested with:
- Google Mobile Ads SDK version 8.5.0.
- Fyber Marketplace SDK version 7.8.6.
Version 7.8.5.0
- Verified compatibility with Fyber Marketplace SDK version 7.8.5.
- Now requires building against Xcode 12.5 or higher.
Built and tested with:
- Google Mobile Ads SDK version 8.5.0.
- Fyber Marketplace SDK version 7.8.5.
Version 7.8.1.0
- Verified compatibility with Fyber Marketplace SDK version 7.8.1.
- Relaxed dependency to Google Mobile Ads SDK version 8.0.0 or higher.
- Added standardized adapter error codes and messages.
- Updated the adapter to use the
.xcframework
format.
Built and tested with:
- Google Mobile Ads SDK version 8.0.0.
- Fyber Marketplace SDK version 7.8.1.
Version 7.8.0.0
- Verified compatibility with Fyber Marketplace SDK version 7.8.0.
Built and tested with:
- Google Mobile Ads SDK version 7.69.0.
- Fyber Marketplace SDK version 7.8.0.
Version 7.7.3.0
- Verified compatibility with Fyber Marketplace SDK version 7.7.3.
- Now requires Google Mobile Ads SDK version 7.69.0 or higher.
Built and tested with:
- Google Mobile Ads SDK version 7.69.0.
- Fyber Marketplace SDK version 7.7.3.
Version 7.7.2.0
- Verified compatibility with Fyber Marketplace SDK version 7.7.2.
- Now requires Google Mobile Ads SDK version 7.67.0 or higher.
Built and tested with:
- Google Mobile Ads SDK version 7.67.0.
- Fyber Marketplace SDK version 7.7.2.
Version 7.7.1.0
- Verified compatibility with Fyber Marketplace SDK version 7.7.1.
- Now requires Google Mobile Ads SDK version 7.66.0 or higher.
Built and tested with:
- Google Mobile Ads SDK version 7.66.0.
- Fyber Marketplace SDK version 7.7.1.
Version 7.6.4.0
- Verified compatibility with Fyber Marketplace SDK version 7.6.4.
- Now requires Google Mobile Ads SDK version 7.65.0 or higher.
- Added GADMAdapterFyberExtras class, enabling publishers to pass keywords and userData to Fyber Marketplace SDK.
Built and tested with:
- Google Mobile Ads SDK version 7.65.0.
- Fyber Marketplace SDK version 7.6.4.
Version 7.6.3.0
- Verified compatibility with Fyber Marketplace SDK version 7.6.3.
Built and tested with:
- Google Mobile Ads SDK version 7.64.0.
- Fyber Marketplace SDK version 7.6.3.
Version 7.6.2.0
- Verified compatibility with Fyber Marketplace SDK version 7.6.2.
- Now requires Google Mobile Ads SDK version 7.64.0 or higher.
Built and tested with:
- Google Mobile Ads SDK version 7.64.0.
- Fyber Marketplace SDK version 7.6.2.
Version 7.6.0.0
- Verified compatibility with Fyber Marketplace SDK version 7.6.0.
- Now requires Google Mobile Ads SDK version 7.62.0 or higher.
- Updated the adapter to support inline adaptive banner requests.
- Added support for rewarded HTML.
- Added new reward callback: IAAdDidReward (for both rewarded video and rewarded HTML). IAVideoCompleted is no longer used for rewarding.
Built and tested with:
- Google Mobile Ads SDK version 7.62.0.
- Fyber Marketplace SDK version 7.6.0.
Version 7.5.6.1
- Temporarily removed Fyber Marketplace SDK-specific logging.
Built and tested with:
- Google Mobile Ads SDK version 7.60.0.
- Fyber Marketplace SDK version 7.5.6.
Version 7.5.6.0
- Verified compatibility with Fyber Marketplace SDK version 7.5.6.
- Updated the minimum required Google Mobile Ads SDK version to 7.60.0.
Built and tested with:
- Google Mobile Ads SDK version 7.60.0.
- Fyber Marketplace SDK version 7.5.6.
Version 7.5.5.0
- Verified compatibility with Fyber Marketplace SDK version 7.5.5.
- Updated the minimum required Google Mobile Ads SDK version to 7.59.0.
Built and tested with:
- Google Mobile Ads SDK version 7.59.0.
- Fyber Marketplace SDK version 7.5.5 .
Version 7.5.4.0
- Verified compatibility with Fyber Marketplace SDK version 7.5.4.
- Removed support for the i386 architecture.
Built and tested with:
- Google Mobile Ads SDK version 7.57.0.
- Fyber Marketplace SDK version 7.5.4.
Version 7.5.3.0
- Verified compatibility with Fyber Marketplace SDK version 7.5.3.
Built and tested with:
- Google Mobile Ads SDK version 7.55.0.
- Fyber Marketplace SDK version 7.5.3.
Version 7.5.1.0
- Verified compatibility with Fyber Marketplace SDK version 7.5.1.
- Fixed a crash that occurred when initializing the Fyber SDK.
Built and tested with:
- Google Mobile Ads SDK version 7.55.0.
- Fyber Marketplace SDK version 7.5.1.
Version 7.5.0.0 (Deprecated)
- This version has been removed. Please use version 7.5.1.0 or higher.
- Verified compatibility with Fyber Marketplace SDK version 7.5.0.
- Adapter will now initialize the Fyber SDK before making an ad request if the Fyber SDK has not been initialized yet.
Built and tested with:
- Google Mobile Ads SDK version 7.53.0.
- Fyber Marketplace SDK version 7.5.0.
Version 7.4.0.0
- Initial release!
- Added support for banner, interstitial and rewarded ad formats.
Built and tested with:
- Google Mobile Ads SDK version 7.52.0.
- Fyber Marketplace SDK version 7.4.0.