Integrate DT Exchange with mediation

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 SDK and adapter into an Android app.

Supported integrations and ad formats

The mediation adapter for DT Exchange has the following capabilities:

Integration
Bidding  1
Waterfall
Formats
Banner
Interstitial
Rewarded  2
Native

1 Bidding integration is in closed beta, reach out to your account manager to request access.

2 Rewarded ads only supported in waterfall mediation.

Requirements

  • Android API level 24 or higher

Step 1: Set up configurations in DT Exchange UI

Add new app and ad placement

Sign up or log in to DT Exchange Console.

Click Add App.

Manage Apps

Choose your platform and placements, fill out the rest of the form, and then click Create App.

Enter the names and select the types for your placements. Then, click Save Placement.

Setup

App ID and Placement ID

Hover over the left navigation bar to open it, then click App Management.

On the App Management page, take note of the App ID next to your app.

Select your app and navigate to the Placements tab. Take note of the Placement ID..

Placement ID

Publisher ID, Consumer Key and Consumer Secret

Click 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.

User Profile

Update your app-ads.txt

Authorized Sellers for Apps app-ads.txt is an IAB Tech Lab initiative that helps ensure your app ad inventory is only sold through channels you've identified as authorized. To prevent a significant loss in ad revenue, you'll need to implement an app-ads.txt file. If you haven't done so already, create an app-ads.txt file for Ad Manager.

To implement app-ads.txt for DT Exchange, Add DT to your app-ads.txt file.

Step 2: Set up DT Exchange demand in Ad Manager UI

Sign in to your Ad Manager account.

Add DT Exchange in Companies

Bidding

This step isn't required for bidding integrations.

Waterfall

Navigate to Admin > Companies, then click the New company button in the All companies tab. Select Ad network.

Select DT Exchange as the Ad network, enter a unique Name and enable Mediation. Turn on Automatic data collection, and enter the Publisher ID, Consumer Secret and Consumer Key obtained in the previous section.

You don't need to enter a Username or Password. Click Save when done.

Enable secure signal sharing

Bidding

Navigate to Admin > Global settings. Go to the Ad Exchange account settings tab and review and toggle on Secure signal sharing. Click Save.

Waterfall

This step isn't required for waterfall integrations.

Share secure signal on bid requests

Bidding

Navigate to Inventory > Secure Signals. Under Secure signals, search for DT Exchange (Fyber Monetization) and toggle on Enable app integration.

Click Save.

Waterfall

This step isn't required for waterfall integrations.

Allow secure signal sharing for SDK Bidding

Bidding

Navigate to Delivery > Demand channel settings. In the Default settings tab, toggle on Allow secure signal sharing for SDK Bidding.

Click Save.

Waterfall

This step isn't required for waterfall integrations.

Configure DT Exchange bidding

Bidding

Navigate to Delivery > Bidders, and click Go to SDK Bidding.

Click New bidder.

Select DT Exchange as the bidder.

Click Continue to enable SDK Bidding for this bidder.

Click Done.

Waterfall

This step isn't required for waterfall integrations.

Configure ad unit mapping

Bidding

Navigate to Delivery > Bidders, and click Go to SDK Bidding.

Select the company for DT Exchange.

Go to the Ad unit mapping tab and click New ad unit mapping.

Choose Specific ad unit. Select an ad unit and format, Mobile app as the Inventory type, and your Mobile application. Then, enter Application ID and Placement ID obtained in the previous section. Finally, click Save.

Waterfall

Navigate to Delivery > Yield groups and click the New yield group button. Select your Mobile application.

Scroll down and click Add yield partner.

Select the company you created for DT Exchange in the previous section. Choose Mobile SDK mediation as the Integration type, Android as the Platform, and Active as the Status.

Enter the Application ID and Placement ID obtained in the previous section, and the Default CPM value. Click Save.

Note: Automatic data collection takes a few days to gather data before it can accurately calculate a Dynamic CPM value for a mediation network. Once the eCPM can be calculated, it is automatically updated on your behalf.

Add DT Exchange (Fyber Monetization) to GDPR and US state regulations ad partners list

Follow the steps in European regulations settings and US state regulations settings to add DT Exchange (Fyber Monetization) to the European and US state regulations ad partners list in the Ad Manager UI.

Step 3: Import the DT SDK and adapter

In your app-level build.gradle.kts file, add the following implementation dependencies and configurations. Use the latest versions of the DT SDK and adapter:

dependencies {
    implementation("com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk:0.19.0-beta01")
    implementation("com.google.ads.mediation:fyber:8.3.8.0")
}

configurations {
    all {
        exclude(group = "com.google.android.gms", module = "play-services-ads")
        exclude(group = "com.google.android.gms", module = "play-services-ads-lite")
    }
}

Manual integration

  • Download the latest version of the DT SDK for Android and add fyber-marketplace-x.y.z.aar to your project.
  • Navigate to the DT Exchange adapter artifacts on Google's Maven Repository. Select the latest version, download the DT Exchange adapter's .aar file, and add it to your project.

Step 4: Implement privacy settings on DT SDK

To comply with Google EU User Consent Policy, you must make certain disclosures to your users in the European Economic Area (EEA), the UK, and Switzerland, and obtain their consent for the use of cookies or other local storage where legally required, and for the collection, sharing, and use of personal data for ads personalization. This policy reflects the requirements of the EU ePrivacy Directive and the General Data Protection Regulation (GDPR). You are responsible for verifying consent is propagated to each ad source in your mediation chain. Google 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 SDK manually. Should you choose to pass consent information to the DT SDK manually, it is recommended that this code is called prior to requesting ads through the Google Mobile Ads SDK.

Java

import com.fyber.inneractive.sdk.external.InneractiveAdManager;
// ...

InneractiveAdManager.setGdprConsent(true);
InneractiveAdManager.setGdprConsentString("myGdprConsentString");

Kotlin

import com.fyber.inneractive.sdk.external.InneractiveAdManager
// ...

InneractiveAdManager.setGdprConsent(true)
InneractiveAdManager.setGdprConsentString("myGdprConsentString")

Visit DT Exchange's GDPR implementation guide for more details and the values that may be provided in the method.

US states privacy laws

US states privacy laws require giving users the right to opt out of the "sale" of their "personal information" (as the law defines those terms), with the opt-out offered through a prominent "Do Not Sell My Personal Information" link on the "selling" party's homepage. The US states privacy laws compliance 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.

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 SDK manually. Should you choose to pass consent information to the DT SDK manually, it is recommended that this code is called prior to requesting ads through the Google Mobile Ads SDK.

Java

import com.fyber.inneractive.sdk.external.InneractiveAdManager;
// ...

InneractiveAdManager.setUSPrivacyString("myUSPrivacyString");

Kotlin

import com.fyber.inneractive.sdk.external.InneractiveAdManager
// ...

InneractiveAdManager.setUSPrivacyString("myUSPrivacyString")

Visit DT Exchange's CCPA implementation guide for more details and the values that may be provided in the method.

Step 5: Add required code

Load ad with activity context

Pass Activity context when loading Interstitial ad formats. Without activity context, ad load will fail.

Step 6: Test your implementation

Enable test ads

Make sure you register your test device for Ad Manager.

Verify test ads

To verify that you are receiving test ads from DT Exchange, enable single ad source testing in ad inspector using the DT Exchange (Bidding) and DT Exchange (Waterfall) ad source(s).

Optional steps

Network-specific parameters

The DT Exchange adapter supports additional request parameters that can be passed to the adapter as an Android Bundle. The adapter looks for the following keys in the bundle:

Request parameters and values
InneractiveMediationDefs.KEY_AGE Integer. The age of the user
FyberMediationAdapter.KEY_MUTE_VIDEO Boolean. Mute or unmute video

Here's a code example of how to set these ad request parameters:

Java

Bundle extras = new Bundle();
extras.putInt(InneractiveMediationDefs.KEY_AGE, 10);
extras.putBoolean(FyberMediationAdapter.KEY_MUTE_VIDEO, false);

AdRequest request = new AdRequest.Builder(AD_UNIT_ID)
   .putAdSourceExtrasBundle(FyberMediationAdapter.class, extras)
   .build();

Kotlin

var extras = Bundle()
extras.putInt(InneractiveMediationDefs.KEY_AGE, 10)
extras.putBoolean(FyberMediationAdapter.KEY_MUTE_VIDEO, false)

val request = AdRequest.Builder(AD_UNIT_ID)
   .putAdSourceExtrasBundle(FyberMediationAdapter::class.java, extras)
   .build()

Error codes

If the adapter fails to receive an ad from DT Exchange, you can check the underlying error from the ad response using ResponseInfo.getAdSourceResponses() under the following class:

com.google.ads.mediation.fyber.FyberMediationAdapter

Here are the codes and accompanying messages thrown by the DT Exchange adapter when an ad fails to load:

Error code Reason
101 DT Exchange server parameters configured in the Ad Manager UI are missing/invalid.
103 The requested ad size does not match a DT Exchange supported banner size.
105 DT SDK loaded an ad but returned an unexpected controller.
106 Ad is not ready to display.
107 Context is not an activity instance.
200-399 DT SDK returned an error. See code for more details.

DT Exchange Android Mediation Adapter Changelog

Version 8.3.8.0

  • Refactored the error codes into a new DTExchangeErrorCodes.kt file.
  • Verified compatibility with DT Exchange SDK 8.3.8.

Built and tested with:

  • Google Mobile Ads SDK version 24.5.0.
  • DT Exchange SDK version 8.3.8.

Version 8.3.7.0

  • Updated adapter to support bidding for banner and interstitial ad formats.
  • Verified compatibility with DT Exchange SDK 8.3.7.

Built and tested with:

  • Google Mobile Ads SDK version 24.1.0.
  • DT Exchange SDK version 8.3.7.

Version 8.3.6.1

  • Updated the minimum required Android API level to 23.
  • Updated the minimum required Google Mobile Ads SDK version to 24.0.0.

Built and tested with:

  • Google Mobile Ads SDK version 24.0.0.
  • DT Exchange SDK version 8.3.6.

Version 8.3.6.0

  • Verified compatibility with DT Exchange SDK 8.3.6.

Built and tested with:

  • Google Mobile Ads SDK version 23.6.0.
  • DT Exchange SDK version 8.3.6.

Version 8.3.5.0

  • Verified compatibility with DT Exchange SDK 8.3.5.

Built and tested with:

  • Google Mobile Ads SDK version 23.6.0.
  • DT Exchange SDK version 8.3.5.

Version 8.3.4.0

  • Verified compatibility with DT Exchange SDK 8.3.4.

Built and tested with:

  • Google Mobile Ads SDK version 23.6.0.
  • DT Exchange SDK version 8.3.4.

Version 8.3.3.0

  • Verified compatibility with DT Exchange SDK 8.3.3.

Built and tested with:

  • Google Mobile Ads SDK version 23.5.0.
  • DT Exchange SDK version 8.3.3.

Version 8.3.2.0

  • Verified compatibility with DT Exchange SDK 8.3.2.

Built and tested with:

  • Google Mobile Ads SDK version 23.4.0.
  • DT Exchange SDK version 8.3.2.

Version 8.3.1.0

  • Verified compatibility with DT Exchange SDK 8.3.1.

Built and tested with:

  • Google Mobile Ads SDK version 23.3.0.
  • DT Exchange SDK version 8.3.1.

Version 8.3.0.0

  • Added support for passing the Google Mobile Ads SDK version to DT Exchange SDK.
  • Verified compatibility with DT Exchange SDK 8.3.0.

Built and tested with:

  • Google Mobile Ads SDK version 23.2.0.
  • DT Exchange SDK version 8.3.0.

Version 8.2.7.0

  • Verified compatibility with DT Exchange SDK 8.2.7.

Built and tested with:

  • Google Mobile Ads SDK version 23.0.0.
  • DT Exchange SDK version 8.2.7.

Version 8.2.6.1

  • Updated the minimum required Google Mobile Ads SDK version to 23.0.0.
  • Verified compatibility with DT Exchange SDK 8.2.6.

Built and tested with:

  • Google Mobile Ads SDK version 23.0.0.
  • DT Exchange SDK version 8.2.6.

Version 8.2.6.0

  • Verified compatibility with DT Exchange SDK 8.2.6.

Built and tested with:

  • Google Mobile Ads SDK version 22.6.0.
  • DT Exchange SDK version 8.2.6.

Version 8.2.5.0

  • Verified compatibility with DT Exchange SDK 8.2.5.

Built and tested with:

  • Google Mobile Ads SDK version 22.5.0.
  • DT Exchange SDK version 8.2.5.

Version 8.2.4.0

  • Verified compatibility with DT Exchange SDK 8.2.4.

Built and tested with:

  • Google Mobile Ads SDK version 22.3.0.
  • DT Exchange SDK version 8.2.4.

Version 8.2.3.0

  • Updated adapter to use new VersionInfo class.
  • Updated the minimum required Google Mobile Ads SDK version to 22.0.0.

Built and tested with:

  • Google Mobile Ads SDK version 22.0.0.
  • DT Exchange SDK version 8.2.3.

Version 8.2.2.1

  • Added support for passing muteVideo key in mediation extra to mute interstitial ads.

Built and tested with:

  • Google Mobile Ads SDK version 21.5.0.
  • DT Exchange SDK version 8.2.2.

Version 8.2.2.0

  • Verified compatibility with DT Exchange SDK 8.2.2.
  • Updated the minimum required Google Mobile Ads SDK version to 21.5.0.

Built and tested with:

  • Google Mobile Ads SDK version 21.5.0.
  • DT Exchange SDK version 8.2.2.

Version 8.2.1.0

  • Rebranded adapter name to "DT Exchange".
  • Verified compatibility with DT Exchange SDK 8.2.1.
  • Updated the minimum required Google Mobile Ads SDK version to 21.3.0.

Built and tested with:

  • Google Mobile Ads SDK version 21.3.0.
  • DT Exchange SDK version 8.2.1.

Version 8.2.0.0

  • Verified compatibility with Fyber SDK 8.2.0.
  • Updated the minimum required Google Mobile Ads SDK version to 21.1.0.

Built and tested with:

  • Google Mobile Ads SDK version 21.1.0.
  • Fyber SDK version 8.2.0.

Version 8.1.5.0

  • Verified compatibility with Fyber SDK 8.1.5.

Built and tested with:

  • Google Mobile Ads SDK version 21.0.0.
  • Fyber SDK version 8.1.5.

Version 8.1.4.0

  • Verified compatibility with Fyber SDK 8.1.4.

Built and tested with:

  • Google Mobile Ads SDK version 21.0.0.
  • Fyber SDK version 8.1.4.

Version 8.1.3.1

  • Updated compileSdkVersion and targetSdkVersion to API 31.
  • Updated the minimum required Google Mobile Ads SDK version to 21.0.0.
  • Updated the minimum required Android API level to 19.

Built and tested with:

  • Google Mobile Ads SDK version 21.0.0.
  • Fyber SDK version 8.1.3.

Version 8.1.3.0

  • Verified compatibility with Fyber SDK 8.1.3.
  • Updated the minimum required Google Mobile Ads SDK version to 20.6.0.

Built and tested with:

  • Google Mobile Ads SDK version 20.6.0.
  • Fyber SDK version 8.1.3.

Version 8.1.2.0

  • Verified compatibility with Fyber SDK 8.1.2.
  • Updated the minimum required Google Mobile Ads SDK version to 20.5.0.

Built and tested with:

  • Google Mobile Ads SDK version 20.5.0.
  • Fyber SDK version 8.1.2.

Version 8.1.0.0

  • Verified compatibility with Fyber SDK 8.1.0.

Built and tested with:

  • Google Mobile Ads SDK version 20.4.0.
  • Fyber SDK version 8.1.0.

Version 7.8.4.1

  • Fixed an issue where the adapter would not initialize if there is a duplicate or more than one unique app ID from the mediation configurations.
  • Updated the minimum required Google Mobile Ads SDK version to 20.4.0.

Built and tested with:

  • Google Mobile Ads SDK version 20.4.0.
  • Fyber SDK version 7.8.4.

Version 7.8.4.0

  • Verified compatibility with Fyber SDK 7.8.4.
  • Updated the minimum required Google Mobile Ads SDK version to 20.3.0.
  • Fixed an issue with rewarded display ads, where onVideoComplete() was not called.
  • Fyber now requires an Activity context to show ads.

Built and tested with:

  • Google Mobile Ads SDK version 20.3.0.
  • Fyber SDK version 7.8.4.

Version 7.8.3.0

  • Verified compatibility with Fyber SDK 7.8.3.
  • Added standardized adapter error codes and messages.
  • Updated the minimum required Google Mobile Ads SDK version to 20.1.0.

Built and tested with:

  • Google Mobile Ads SDK version 20.1.0.
  • Fyber SDK version 7.8.3.

Version 7.8.2.0

  • Verified compatibility with Fyber SDK 7.8.2.
  • Updated the minimum required Google Mobile Ads SDK version to 20.0.0.

Built and tested with:

  • Google Mobile Ads SDK version 20.0.0.
  • Fyber SDK version 7.8.2.

Version 7.8.1.0

  • Verified compatibility with Fyber SDK 7.8.1.

Built and tested with:

  • Google Mobile Ads SDK version 19.7.0.
  • Fyber SDK version 7.8.1.

Version 7.8.0.0

  • Verified compatibility with Fyber SDK 7.8.0.
  • Updated the minimum required Google Mobile Ads SDK version to 19.7.0.

Built and tested with:

  • Google Mobile Ads SDK version 19.7.0.
  • Fyber SDK version 7.8.0.

Version 7.7.4.0

  • Verified compatibility with Fyber SDK 7.7.4.
  • Fixed an issue where onUserEarnedReward() is forwarded twice for rewarded ads.

Built and tested with:

  • Google Mobile Ads SDK version 19.5.0.
  • Fyber SDK version 7.7.4.

Version 7.7.3.0

  • Verified compatibility with Fyber SDK 7.7.3.

Built and tested with:

  • Google Mobile Ads SDK version 19.5.0.
  • Fyber SDK version 7.7.3.

Version 7.7.2.0

  • Verified compatibility with Fyber SDK 7.7.2.
  • Updated the minimum required Google Mobile Ads SDK version to 19.5.0.

Built and tested with:

  • Google Mobile Ads SDK version 19.5.0.
  • Fyber SDK version 7.7.2.

Version 7.7.1.0

  • Verified compatibility with Fyber SDK 7.7.1.
  • Updated the minimum required Google Mobile Ads SDK version to 19.4.0.

Built and tested with:

  • Google Mobile Ads SDK version 19.4.0.
  • Fyber SDK version 7.7.1.

Version 7.7.0.0

  • Verified compatibility with Fyber SDK 7.7.0.

Built and tested with:

  • Google Mobile Ads SDK version 19.3.0.
  • Fyber SDK version 7.7.0.

Version 7.6.1.0

  • Verified compatibility with Fyber SDK 7.6.1.

Built and tested with:

  • Google Mobile Ads SDK version 19.3.0.
  • Fyber SDK version 7.6.1.

Version 7.6.0.0

  • Verified compatibility with Fyber SDK 7.6.0.
  • Updated the adapter to support inline adaptive banner requests.
  • Updated the minimum required Google Mobile Ads SDK version to 19.3.0.
  • Fixed a bug where onAdOpened()/onAdClosed() methods were not being called for banner ads.

Built and tested with:

  • Google Mobile Ads SDK version 19.3.0.
  • Fyber SDK version 7.6.0.

Version 7.5.4.0

  • Verified compatibility with Fyber SDK 7.5.4.
  • Updated the minimum required Google Mobile Ads SDK version to 19.1.0.

Built and tested with:

  • Google Mobile Ads SDK version 19.1.0.
  • Fyber SDK version 7.5.4.

Version 7.5.3.0

  • Verified compatibility with Fyber SDK 7.5.3.

Built and tested with:

  • Google Mobile Ads SDK version 19.0.1.
  • Fyber SDK version 7.5.3.

Version 7.5.2.0

  • Verified compatibility with Fyber SDK 7.5.2.
  • Updated the minimum required Google Mobile Ads SDK version to 19.0.1.

Built and tested with:

  • Google Mobile Ads SDK version 19.0.1.
  • Fyber SDK version 7.5.2.

Version 7.5.0.0

  • Verified compatibility with Fyber SDK 7.5.0.
  • Fixed NullPointerException crash during Fyber ad loading.

Built and tested with:

  • Google Mobile Ads SDK version 18.3.0.
  • Fyber SDK version 7.5.0.

Version 7.4.1.0

  • Verified compatibility with Fyber SDK 7.4.1.
  • Updated the minimum required Google Mobile Ads SDK version to 18.3.0.

Built and tested with:

  • Google Mobile Ads SDK version 18.3.0.
  • Fyber SDK version 7.4.1.

Version 7.3.4.0

  • Initial release!
  • Supports Banner, Interstitial and Rewarded ads.

Built and tested with:

  • Google Mobile Ads SDK version 18.2.0.
  • Fyber SDK version 7.3.4.