DT Exchange をメディエーションと統合する

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 a Flutter app.

Supported integrations and ad formats

The AdMob mediation adapter for DT Exchange has the following capabilities:

Integration
Bidding
Waterfall
Formats
Banner
Interstitial
Rewarded

Requirements

  • Latest Google Mobile Ads SDK
  • Flutter 3.7.0 or higher
  • To deploy on Android
    • Android API level 21 or higher
  • To deploy on iOS
    • iOS deployment target of 12.0 or higher
  • A working Flutter project configured with Google Mobile Ads SDK. See Get Started for details.
  • Complete the mediation Get started guide

Step 1: Set up configurations in DT Exchange UI

新しいアプリと広告のプレースメントを追加

DT Exchange コンソールに登録またはログインします。

[Add App] ボタンをクリックしてアプリを追加します。

アプリを管理する

[プラットフォーム] を選択し、フォームの残りの部分を入力して、[プレースメントを追加] をクリックします。

Android

iOS

[Name your Placement] フィールドに新しいプレースメントの名前を入力し、プルダウン リストから目的の [プレースメント タイプ] を選択します。最後に [Save Placement] をクリックします。

設定

アプリ ID とプレースメント ID

左ナビゲーション バーにカーソルを合わせ、開きます。左側のメニューで [アプリ] をクリックします。

メニュー

[アプリの管理] ページで、アプリの横にある [アプリ ID] をメモします。

App ID

アプリを選択して [プレースメント] タブに移動し、[プレースメント名] の横にあるコピーアイコンをクリックします。[プレースメント ID] をメモします。

プレースメント ID

パブリッシャー ID、コンシューマ キー、コンシューマ シークレット

左側のメニューからユーザー名をクリックし、[ユーザー プロフィール] を選択します。

ユーザー プロフィール メニュー

[Publisher ID]、[Consumer Key]、[Consumer Secret] は次のステップで必要になるため、メモしておきます。

ユーザー プロフィール

Step 2: Set up DT Exchange demand in AdMob UI

広告ユニットのメディエーション設定を行う

Android

手順については、 Android 向けガイドのステップ 2 をご覧ください。

iOS

手順については、 iOS 向けガイドのステップ 2 をご覧ください。

Add Fyber to GDPR and US state regulations ad partners list

GDPR 設定 米国の州規制の設定 の手順に沿って、 AdMob UI の GDPR および米国の州規制の広告パートナーのリストに Fyber を追加します。

Step 3: Import the DT Exchange SDK and adapter

pub.dev による統合

最新バージョンの SDK とともに次の依存関係を追加します。 DT Exchange パッケージ内の SDK とアダプタ pubspec.yaml ファイル:

dependencies:
  gma_mediation_dtexchange: ^1.0.0

手動統合

最新バージョンの Google モバイル広告メディエーション プラグイン DT Exchange ダウンロードしたファイルを解凍し、抽出したプラグイン フォルダを追加します。 (およびその内容)を Flutter プロジェクトに追加します。次に、Terraform でプラグインを pubspec.yaml ファイルに次の依存関係を追加します。

dependencies:
  gma_mediation_dtexchange:
    path: path/to/local/package

Step 4: Implement privacy settings on DT Exchange SDK

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 Google Mobile Ads mediation plugin for DT Exchange does not support passing consent information to the DT Exchange SDK.

US states privacy laws

U.S. 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 via a prominent "Do Not Sell My Personal Information" link on the "selling" party's homepage. The U.S. 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.

The Google Mobile Ads mediation plugin for DT Exchange does not support passing consent information to the DT Exchange SDK.

Step 5: Add required code

Android

No additional code is required for DT Exchange integration.

iOS

SKAdNetwork integration

Follow DT Exchange's documentation to add the SKAdNetwork identifiers to your project's Info.plist file.

Step 6: Test your implementation

テスト広告を有効にする

AdMob。

テスト広告を確認する

DT Exchangeからテスト広告を受信していることを確認するには、広告インスペクタで DT Exchange (Waterfall) 広告ソースを使用して単独の広告ソースのテストを有効にします。

Error codes

If the adapter fails to receive an ad from DT Exchange, publishers can check the underlying error from the ad response using ResponseInfo under the following class:

Android

com.google.ads.mediation.fyber.FyberMediationAdapter

iOS

GADMediationAdapterFyber

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

Android

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

iOS

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 Flutter Mediation Adapter Changelog

1.0.0

  • Initial release.
  • Verified compatibility with DT Exchange Android adapter version 8.2.7.0.
  • Verified compatibility with DT Exchange iOS adapter version 8.2.8.0.
  • Built and tested with the Google Mobile Ads Flutter Plugin version 5.1.0.