Integrating the DU Ad Platform with Mediation

This guide is for publishers who want to use the Google Mobile Ads SDK to load and display ads from the DU Ad Platform via mediation. It covers how to add the DU Ad Platform to an ad unit's mediation configuration, how to set up Ad Network Optimization (ANO), and how to integrate the DU Ad SDK and adapter into an Android app.

Supported ad formats and features

The AdMob mediation adapter for the DU Ad Platform has the following capabilities:

Formats
Banners
Interstitials
Rewarded Video
Native Advanced
Features
Smart Banners
Ad Network Optimization (ANO)

Requirements

  • Android SDK 4.0 (API level 14) or later
  • Google Play services 9.2 or later

Step 1: Set up the DU Ad Platform

Sign up or log in to your DU Ad Platform account. Add your app to the DU Ad Platform publisher dashboard by selecting the APPs tab and then clicking the Add APP button.

DU Ad set up new app

Select Android as the System type and fill out the remaining form fields. Once you have filled in your app details, click Next at the bottom of the page.

DU Ad create app

Next, create a placement by clicking the Create placement button.

DU Ad create placement

Enter the name of the placement in the Placement name field, select an Ad Format, and click Save. DU Ad save placement

You should see your newly created placement and its corresponding Placement ID (PID). Click Next to continue to the next step.

DU Ad placement ID

You will find your App ID and Placement ID listed on this screen under the Embed the App ID section. Copy these values as you will need them in an upcoming step.

Next, click the Upload button and upload a DU Ad SDK integrated APK of your app.

Once you have uploaded your app’s APK, click Next to continue to the next step. DU Ad upload APK Enter the Google Play address of your app in the Google Play Address field and click the Submit for review button to complete the process for adding your app to the DU Ad Platform dashboard. DU Ad add play address

In addition to the App ID and Placement ID, you'll also need your DU Ad Platform user name and Account Token to set up your AdMob ad unit ID.

Navigate to the Account tab in your DU Ad dashboard to locate your Account Token. You can find your user name in the top-right corner of your dashboard.

DU Ad account token

Step 2: Configure mediation settings for your AdMob ad unit

You will now need to add the DU Ad Platform to the mediation configuration for your ad unit. To do so, 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 DU Ad as an ad source.

To create a new mediation group, select Create Mediation Group.

AdMob Beta mediation tab

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. Then click Add Ad Units.

New mediation group 2

Associate this mediation group with your existing AdMob ad units. Then click Done.

Select ad unit

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

Mediation group ad units

Add the DU Ad Platform as an ad source

In the Ad Sources card, select Add Ad Network. Then select DU Ad Platform.

Enable the Optimize feature, then enter the user name and Account Token obtained in the previous section to set up ANO for the DU Ad Platform. Then enter an eCPM value for the DU Ad Platform and click Continue.

Enter the Placement ID and App ID obtained in previous section.

Configure DU Ad Platform ad unit

Using rewarded video ads

In the settings for your rewarded video ad unit, provide values for the reward amount and reward type. Then, to ensure you provide the same reward to the user no matter which ad network is served, check the Apply to all networks in Mediation groups box.

Mediation override reward

If you don't apply this setting, the DU Ad Platform adapter defaults to a reward of type "" with a value of 1. The DU Ad Platform does not provide specific reward values for its rewarded video ads.

For more information on setting reward values for AdMob ad units, see Create an ad unit.

Step 3: Import the DU Ad Platform SDK and adapter

Download the DU Ad Platform SDK, extract the included AAR files and include them in the libs directory of the appropriate module of your project.

Add the following implementation dependencies with the latest version of the DU Ad Platform SDK and adapter in the app-level build.gradle file:

dependencies {
implementation "com.google.android.gms:play-services-ads:15.0.1"
implementation "com.google.ads.mediation:duadplatform:1.0.0.0"
implementation "com.android.support:palette-v7:27.1.1"

implementation (name: 'DuappsAd-CW-v1.1.1.0', ext: 'aar')
implementation (name: 'DuVideoSdk-v1.0.1', ext: 'aar')
}

Manual integration

Download the DU Ad Platform SDK, extract the included AAR files and add them to your project. Download the latest DU Ad Adapter located under the Files tab in Bintray and add it to your project.

Step 4: Additional code required

No additional code is required for DU Ad Platform integration.

Step 5: Test your implementation

No additional steps are required to test the implementation.

Optional steps

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.

The section below shows you how to enable or disable personalized ads for DU Ad Platform.

In SDK version CW1.1.1.8, DU Ad Platform added the setConsentStatus and getConsentStatus methods. The following sample code shows how to pass consent information to the DU Ad Platform SDK. If you choose to call this method, it is recommended that you do so prior to requesting ads via the Google Mobile Ads SDK.

import com.duapps.ad.base.DuAdNetwork;
//…

DuAdNetwork.setConsentStatus(context, true);

See DU Ad Platform’s privacy notice for more details.

Send feedback about...

Google AdMob > Mobile Ads SDK > Android
Google AdMob > Mobile Ads SDK > Android
Need help? Visit our support page.