미디에이션과 Chartboost 통합

This guide shows you how to use the Google Mobile Ads SDK to load and display ads from Chartboost using mediation, covering waterfall integrations. It covers how to add Chartboost to an ad unit's mediation configuration, and how to integrate the Chartboost SDK and adapter into an Android app.

Supported integrations and ad formats

The AdMob mediation adapter for Chartboost has the following capabilities:

Integration
Bidding
Waterfall
Formats
Banner
Interstitial
Rewarded
Native

Requirements

  • Android API level 21 or higher

Step 1: Set up configurations in Chartboost UI

Sign up for a Chartboost account and log in once your account is verified. Then, navigate to the Apps management tab.

Chartboost apps dashboard

Click the Add new app button to create your app.

Apps Management

Fill out the rest of the form and click the Add App button to finalize your app.

New app form

After your app is created, you will be directed to its dashboard. Take note of the App ID and App Signature of your app.

App settings

AdMob requires the Chartboost User ID and User Signature for setting up your AdMob ad unit ID. You can find these parameters by clicking Chartboost mediation on the Chartboost UI.

Chartboost mediation dashboard

Navigate to the Resources > API Explorer tab and take note of your User ID and User Signature located under the Authentication section.

Chartboost api explorer

Turn on test mode

You can enable test mode on your app by navigating to the Apps management tab from the Chartboost UI, selecting your app from the list and clicking on Edit app settings.

Edit app settings

From your app's settings, you can toggle Test mode on your app.

Chartboost test mode

Once test mode is enabled, you can request ads using the ad unit ID created earlier and receive a Chartboost test ad.

After you are able to receive Chartboost test ads, your app will be placed on Chartboost's Publisher App Review. In order for monetization on Chartboost to work, the publisher app review will need to be approved by Chartboost.

Step 2: Set up Chartboost demand in AdMob UI

광고 단위에 대한 미디에이션 설정 구성

Chartboost 를 광고 단위의 미디에이션 구성에 추가해야 합니다.

먼저 AdMob 계정에 로그인합니다. 그런 다음 미디에이션 탭으로 이동합니다. 수정할 기존 미디에이션 그룹이 있는 경우 해당 미디에이션 그룹의 이름을 클릭하여 수정한 후 Chartboost 광고 소스로 추가로 건너뜁니다.

새 미디에이션 그룹을 만들려면 미디에이션 그룹 만들기를 선택합니다.

광고 형식과 플랫폼을 입력하고 계속을 클릭합니다.

미디에이션 그룹에 이름을 지정하고 타겟팅할 위치를 선택합니다. 미디에이션 그룹 상태를 사용으로 설정한 다음 광고 단위 추가를 클릭합니다.

이 미디에이션 그룹을 하나 이상의 기존AdMob 광고 단위와 연결합니다. 그런 다음 완료를 클릭합니다.

이제 광고 단위 카드가 선택한 광고 단위로 채워진 것을 볼 수 있습니다.

광고 소스로 Chartboost 추가

광고 소스 섹션의 폭포식 구조 카드에서 광고 소스 추가를 선택합니다. 그런 다음 Chartboost을 선택합니다.

Chartboost를 선택하고 최적화 스위치를 사용 설정합니다. 이전 섹션에서 가져온 User ID and User Signature을 입력하여Chartboost에 대해 광고 소스 최적화를 설정합니다. 그런 다음Chartboost 에 eCPM 값을 입력하고 계속을 클릭합니다.

이미 Chartboost에 대한 매핑이 있는 경우 해당 매핑을 선택할 수 있습니다. 그렇지 않으면 매핑 추가를 클릭합니다.

그런 다음 이전 섹션에서 얻은 App ID, App Signature and Ad Location를 입력합니다. 그런 다음 완료를 클릭합니다.

Chartboost 광고 위치(이름이 지정된 위치)는 앱에서 광고를 게재할 위치를 나타내는 단순한 이름입니다.AdMob 설정에 지정된 위치로 요청을 보냅니다. 요청이 전송되면 Chartboost는 보고 목적으로 플랫폼에 위치를 추가합니다. 또한 사용자는 게임에서 광고 위치를 호출하기 전에 Chartboost 플랫폼에서 직접 새 광고 위치를 만들 수 있습니다.

Chartboost UI에서 광고 위치는 고급 설정을 클릭하여 기본 설정 페이지에 표시할 수 있습니다. 자세한 내용은 Chartboost의 이름이 지정된 위치 가이드를 참조하세요.

마지막으로 완료를 클릭하여 Chartboost를 광고 소스로 추가한 후 저장을 클릭합니다.

Add Chartboost to GDPR and US state regulations ad partners list

GDPR 설정미국 주 규정 설정 Chartboost 를 AdMob UI의 GDPR 및 미국 주 규정 광고 파트너 목록에 추가합니다.

Step 3: Import the Chartboost SDK and adapter

In your project-level settings.gradle.kts file, add the following repositories:

dependencyResolutionManagement {
  repositories {
    google()
    mavenCentral()
    maven {
      url = uri("https://cboost.jfrog.io/artifactory/chartboost-ads/")
    }
  }
}

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

dependencies {
    implementation("com.google.android.gms:play-services-ads:23.0.0")
    implementation("com.google.ads.mediation:chartboost:9.7.0.0")
}

Manual integration

  1. Download the .aar file of the latest version of the Chartboost SDK from Maven Central, and add it to your project.

  2. Navigate to the Chartboost adapter artifacts on Google's Maven Repository. Select the latest version, download the Chartboost adapter's .aar file, and add it to your project.

Step 4: Implement privacy settings on Chartboost 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.

In SDK version 8.1.0, Chartboost added the addDataUseConsent() method. The following sample code sets data use consent to NON_BEHAVIORAL. If you choose to call this method, it is recommended that you do so prior to requesting ads through the Google Mobile Ads SDK.

Java

DataUseConsent dataUseConsent = new GDPR(GDPR.GDPR_CONSENT.NON_BEHAVIORAL);
Chartboost.addDataUseConsent(context, dataUseConsent);

Kotlin

val dataUseConsent = GDPR(GDPR.GDPR_CONSENT.NON_BEHAVIORAL)
Chartboost.addDataUseConsent(context, dataUseConsent)

See Chartboost's GDPR article and their Android Privacy Methods for more details and the values that can be provided in each method.

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.

In SDK version 8.1.0, Chartboost added the addDataUseConsent() method. The following sample code sets data use consent to OPT_IN_SALE. If you choose to call this method, it is recommended that you do so prior to requesting ads through the Google Mobile Ads SDK.

Java

DataUseConsent dataUseConsent = new CCPA(CCPA.CCPA_CONSENT.OPT_IN_SALE);
Chartboost.addDataUseConsent(context, dataUseConsent);

Kotlin

val dataUseConsent = CCPA(CCPA.CCPA_CONSENT.OPT_IN_SALE)
Chartboost.addDataUseConsent(context, dataUseConsent)

See Chartboost's CCPA article and their Android Privacy Methods for more details and the values that can be provided in each method.

Step 5: Add required code

Modify AndroidManifest

Other elements

Add the following attribute to each activity in the AndroidManifest.xml file that will be showing Chartboost ads and supports different orientations:

android:configChanges="keyboardHidden|orientation|screenSize"

Lifecycle events

Per Chartboost's recommendation, Add the following code to all of your activity's lifecycle events that will be showing Chartboost ads.

Java

import com.chartboost.sdk.Chartboost;
// ...

@Override
public void onBackPressed() {
    // If an interstitial is on screen, close it.
    if (Chartboost.onBackPressed()) {
        return;
    } else {
        super.onBackPressed();
    }
}

Kotlin

import com.chartboost.sdk.Chartboost
// ...

@Override
fun onBackPressed() {
    // If an interstitial is on screen, close it.
    if (Chartboost.onBackPressed())
        return
    else
        super.onBackPressed()
}

Step 6: Test your implementation

테스트 광고 사용 설정

AdMob 용 테스트 기기를 등록하고 Chartboost UI에서 테스트 모드를 사용 설정해야 합니다.

테스트 광고 확인

Chartboost에서 테스트 광고를 수신하고 있는지 확인하려면 광고 검사기에서 Chartboost (Waterfall) 광고 소스를 사용하여 단일 광고 소스 테스트를 사용 설정하세요.

Optional steps

Permissions

For optimal performance, Chartboost recommends adding the following optional permissions to your app's AndroidManifest.xml file:

<uses-permission android:name="android.permission.READ_PHONE_STATE" />

Error codes

If the adapter fails to receive an ad from Chartboost, you can check the underlying error from the ad response using ResponseInfo.getAdapterResponse() under the following classes:

com.google.ads.mediation.chartboost.ChartboostAdapter
com.google.ads.mediation.chartboost.ChartboostMediationAdapter

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

Error code Reason
0-99 Chartboost SDK returned an error. See Chartboost's documentation for more details.
101 The requested ad size does not match a Chartboost supported banner size.
102 Chartboost can only load 1 ad per location at a time.
103 Chartboost server parameters configured in the AdMob UI are missing/invalid.
104 The Chartboost interstitial or rewarded ad is not ready to be shown.

Chartboost Android Mediation Adapter Changelog

Version 9.7.0.0

  • Verified compatibility with Chartboost SDK version 9.7.0.
  • Updated the minimum required Google Mobile Ads SDK version to 23.0.0.

Built and tested with:

  • Google Mobile Ads SDK version 23.0.0.
  • Chartboost SDK version 9.7.0.

Version 9.6.1.0

  • Verified compatibility with Chartboost SDK version 9.6.1.

Built and tested with:

  • Google Mobile Ads SDK version 22.6.0.
  • Chartboost SDK version 9.6.1.

Version 9.6.0.0

  • Verified compatibility with Chartboost SDK version 9.6.0.

Built and tested with:

  • Google Mobile Ads SDK version 22.5.0.
  • Chartboost SDK version 9.6.0.

Version 9.5.0.0

  • Verified compatibility with Chartboost SDK version 9.5.0.

Built and tested with:

  • Google Mobile Ads SDK version 22.3.0.
  • Chartboost SDK version 9.5.0.

Version 9.4.1.0

  • Verified compatibility with Chartboost SDK version 9.4.1.

Built and tested with:

  • Google Mobile Ads SDK version 22.2.0.
  • Chartboost SDK version 9.4.1.

Version 9.4.0.0

  • Verified compatibility with Chartboost SDK version 9.4.0.

Built and tested with:

  • Google Mobile Ads SDK version 22.1.0.
  • Chartboost SDK version 9.4.0.

Version 9.3.1.0

  • Verified compatibility with Chartboost SDK version 9.3.1.

Built and tested with:

  • Google Mobile Ads SDK version 22.1.0.
  • Chartboost SDK version 9.3.1.

Version 9.3.0.0

  • Verified compatibility with Chartboost SDK version 9.3.0.

Built and tested with:

  • Google Mobile Ads SDK version 22.0.0.
  • Chartboost SDK version 9.3.0.

Version 9.2.1.1

  • 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.
  • Chartboost SDK version 9.2.1.

Version 9.2.1.0

  • Verified compatibility with Chartboost SDK 9.2.1.

Built and tested with:

  • Google Mobile Ads SDK version 21.5.0.
  • Chartboost SDK version 9.2.1.

Version 9.2.0.0

  • Verified compatibility with Chartboost SDK 9.2.0.
  • 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.
  • Chartboost SDK version 9.2.0.

Version 9.1.1.0

  • Added the ChartboostMediationAdapter.setAppParams(String, String) method as an optional way to hardcode which app ID and app signature to use to initialize the Chartboost SDK.
  • Verified compatibility with Chartboost SDK 9.1.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.
  • Chartboost SDK version 9.1.1.

Version 8.4.3.1

  • 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.
  • Chartboost SDK version 8.4.3.

Version 8.4.3.0

  • Verified compatibility with Chartboost SDK 8.4.3.

Built and tested with:

  • Google Mobile Ads SDK version 20.6.0.
  • Chartboost SDK version 8.4.3.

Version 8.4.2.0

  • Verified compatibility with Chartboost SDK 8.4.2.
  • Updated compileSdkVersion and targetSdkVersion to API 31.
  • 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.
  • Chartboost SDK version 8.4.2.

Version 8.4.1.0

  • Verified compatibility with Chartboost SDK 8.4.1.
  • 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.
  • Chartboost SDK version 8.4.1.

Version 8.3.1.0

  • Verified compatibility with Chartboost SDK 8.3.1.
  • Updated the adapter to use new AdError API.

Built and tested with:

  • Google Mobile Ads SDK version 20.5.0.
  • Chartboost SDK version 8.3.1.

Version 8.3.0.0

  • Verified compatibility with Chartboost SDK 8.3.0.
  • 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.
  • Chartboost SDK version 8.3.0.

Version 8.2.1.0

  • Verified compatibility with Chartboost SDK 8.2.1.
  • 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.
  • Chartboost SDK version 8.2.1.

Version 8.2.0.1

  • 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.
  • Chartboost SDK version 8.2.0.

Version 8.2.0.0

  • Verified compatibility with Chartboost SDK 8.2.0.
  • 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.
  • Chartboost SDK version 8.2.0.

Version 8.1.0.0

  • Verified compatibility with Chartboost SDK 8.1.0.

Built and tested with:

  • Google Mobile Ads SDK version 19.2.0.
  • Chartboost SDK version 8.1.0.

Version 8.0.3.2

  • Added descriptive error codes and reasons for adapter load/show failures.
  • Updated the minimum required Google Mobile Ads SDK version to 19.2.0.

Built and tested with:

  • Google Mobile Ads SDK version 19.2.0.
  • Chartboost SDK version 8.0.3.

Version 8.0.3.1

  • Added support for Chartboost banner ads.

Built and tested with:

  • Google Mobile Ads SDK version 19.1.0.
  • Chartboost SDK version 8.0.3.

Version 8.0.3.0

  • Verified compatibility with Chartboost SDK 8.0.3.
  • 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.
  • Chartboost SDK version 8.0.3.

Version 8.0.2.0

  • Verified compatibility with Chartboost SDK 8.0.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.
  • Chartboost SDK version 8.0.2.

Version 8.0.1.0

  • Verified compatibility with Chartboost SDK 8.0.1.
  • Requires Chartboost SDK 8.0.1 or higher.
  • Activity context is no longer required to load ads.

Built and tested with:

  • Google Mobile Ads SDK version 18.3.0.
  • Chartboost SDK version 8.0.1.

Version 7.5.0.1

  • Fixed a bug where Chartboost adapter failed to invoke ad events.
  • 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.
  • Chartboost SDK version 7.5.0.

Version 7.5.0.0

  • Verified compatibility with Chartboost SDK 7.5.0.
  • Migrated the adapter to use AndroidX dependencies.
  • Updated the minimum required Google Mobile Ads SDK version to 18.1.1.

Version 7.3.1.1

  • Updated adapter to support new open-beta Rewarded API.
  • Updated the minimum required Google Mobile Ads SDK version to 17.2.0.

Version 7.3.1.0

  • Verified compatibility with Chartboost SDK 7.3.1.

Version 7.3.0.0

  • Verified compatibility with Chartboost SDK 7.3.0.

Version 7.2.1.0

  • Verified compatibility with Chartboost SDK 7.2.1.

Version 7.2.0.1

  • Updated the adapter to invoke the onRewardedVideoComplete() ad event.

Version 7.2.0.0

  • Verified compatibility with Chartboost SDK 7.2.0.

Version 7.1.0.0

  • Verified compatibility with Chartboost SDK 7.1.0.

Version 7.0.1.0

  • Verified compatibility with Chartboost SDK 7.0.1.
  • Added support for new Chartboost error codes.
  • Updated the Adapter project for Android Studio 3.0

Version 7.0.0.0

  • Updated the adapter to make it compatible with Chartboost SDK 7.0.0.

Version 6.6.3.0

  • Verified compatibility with Chartboost SDK 6.6.3.

Version 6.6.2.0

  • Verified compatibility with Chartboost SDK 6.6.2.

Version 6.6.1.0

  • Verified compatibility with Chartboost SDK 6.6.1.

Version 6.6.0.0

  • Changed the version naming system to [Chartboost SDK version].[adapter patch version].
  • The adapters can now be added as a compile dependency by adding the following to the build.gradle file's dependencies tag: compile 'com.google.ads.mediation:chartboost:6.6.0.0'
  • Moved to distributing the adapter as an aar instead of a jar file (see README for additional instructions).

Version 1.1.0

  • Removed Chartboost Ad Location from Chartboost extras. Ad Location is now specified in the AdMob console when configuring Chartboost for mediation.

Version 1.0.0

  • Initial release. Supports reward-based video ads and interstitial ads.