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 (DAP) via mediation. It covers how to add DAP to an ad unit's mediation configuration, how to set up Ad Network Optimization (ANO), and how to integrate the DAP SDK and adapter into a Unity app.

Supported Ad Formats

Formats Android iOS
Banners
Interstitials
Rewarded video
Rewarded video (new APIs)
Features
Smart Banners
Ad Network Optimization

Requirements

  • Unity 4 or higher
  • To deploy on Android:
    • Android SDK 4.1 (API level 16) or higher
    • Google Play services 17.2.0 or higher
  • To deploy on iOS
    • Xcode 6.0 or higher
    • iOS deployment target of 8.0 or higher
    • Google Mobile Ads SDK 7.14.0 or higher
  • A working Unity project configured with Google Mobile Ads SDK. See the Quick Start Guide for details.

Step 1: Set up DAP Platform

Sign up and log in to your DAP account.

Enter app details

Add your app to the publisher dashboard by selecting the APPs tab and then clicking the Add App button.

DU Ad set up new app

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

Android

DU Ad create app

iOS

DU Ad create app

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

Android

DU Ad create placement

iOS

DU Ad create app

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

DU Ad save placement

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

Android

DU Ad placement ID

iOS

DU Ad create app

Next, click the Upload button and upload a DAP SDK integrated build of your app.

Android

Upload your app's DAP SDK integrated APK and click Next to continue.

DU Ad upload APK

You will find 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.

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

DU Ad add play address

iOS

Upload your app's DAP SDK integrated IPA and click Next to continue.

DU Ad upload APK

You will find 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.

Enter the App Store address of your app in the App Store Address field and click the Submit for review button to complete the process for adding your app to the publisher dashboard.

DU Ad add play address

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

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

DU Ad account token

Step 2: Configure AdMob ad unit

You need to add DAP to the mediation configuration for your ad unit. First sign in to your AdMob account.

If you're deploying your Unity app to both Android and iOS, you need two AdMob ad units, one for each platform.

Android

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 DAP 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. Then 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, as shown below:

Add DAP as an ad source

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

Next, enable the Optimize feature, then enter the Login Name and Account Token obtained in the previous section to set up ANO for DAP. Enter an eCPM value and click Continue.

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

Using rewarded video ads

In the settings for your rewarded video ad unit, check the Apply to all networks in Mediation groups box, so that you provide the same reward to the user no matter which ad network is served.

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.

iOS

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 DAP 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. Then 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 as shown below:

Add DAP as an ad source

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

Next, enable the Optimize feature, then enter the Login Name and Account Token obtained in the previous section to set up ANO for DAP. Enter an eCPM value and click Continue.

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

Step 3: Import the DAP Platform SDK and adapter

Download the latest version of Google Mobile Ads mediation plugin for DU Ad Platform and extract the GoogleMobileAdsDUAdPlatformMediation.unitypackage from the zip file.

In your Unity project editor, select Assets > Import Package > Custom Package and find the GoogleMobileAdsDUAdPlatformMediation.unitypackage file you downloaded. Make sure all the files are selected and click Import.

DU Ad import sdk

Next, follow the steps outlined below for each platform your app supports.

Android

Download the latest versions of the DU Ad Platform CW and Video SDKs. Extract the included .aar files and copy them to the Assets/Plugins/Android folder.

iOS

Download the latest version of the DU Ad Platform iOS SDK, as well as the DU Ad Platform iOS Adapter from Bintray. Then copy both .framework files to the Assets/Plugins/iOS folder.

Step 4: Additional code required

Android

Modify the AndroidManifest.xml file located under the Assets/Plugins/Android/GoogleMobileAdsDUAdPlatformMediation folder and add the App ID for your Android app obtained in Step 1 as the value for app_license.

...
<application>
  <meta-data
    android:name="app_license"
    android:value="YOUR_APP_ID_HERE" />
...

iOS

No additional code is required for DUAd iOS integration.

Step 5: Test your implementation

No additional steps 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 DAP.

The Google Mobile Ads mediation plugin for DAP includes the SetUserConsent() and GetUserConsent() 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.

using GoogleMobileAds.Api.Mediation.DUAdPlatform;
// ...

DUAdPlatform.SetConsentStatus(true);

See DAP's privacy notice for more details.

フィードバックを送信...

ご不明な点がありましたら、Google のサポートページをご覧ください。