Line とメディエーションを統合する(ベータ版)

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

The dashboard interface for Line uses Japanese text for its labels, buttons, and descriptions. The screenshots in this guide have not been translated. In this guide's descriptions and instructions however, labels and buttons are translated with their English language equivalents in parentheses.

Supported integrations and ad formats

The mediation adapter for Line has the following capabilities:

Integration
Bidding
Waterfall  1
Formats
Banner
Interstitial
Rewarded
Native

1 Waterfall integration is in open beta.

Requirements

  • iOS deployment target of 12.0 or higher

Step 1: Set up configurations in Line UI

登录您的 Line 帐号。

添加新应用

依次点击 KML 通知枠管理 (Ad Slot Management) > 高速 叙述(媒体)。然后,点击 新制定(新建)

填写相应表单,然后点击登仍可以(注册)

记下应用 ID。

创建广告展示位置

点击您要添加广告展示位置的应用的 ID。然后,选择详情(详情)

点击 ⍛ト 附加(添加槽)

填写表单,完成后,点击(登仍可以)注册

记下广告位 ID。

Step 2: Set up Line demand in AdMob UI

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

広告ユニットのメディエーション設定に Line を追加する必要があります。

AdMob アカウントにログインします。次に、[メディエーション] タブに移動します。既存のメディエーション グループを編集する場合は、そのメディエーション グループの名前をクリックして編集し、広告ソースとして Line を追加するに進んでください。

新しいメディエーション グループを作成するには、[メディエーション グループを作成] を選択します。

広告フォーマットとプラットフォームを入力して、[続行] をクリックします。

メディエーション グループに名前を付けて、ターゲットとする地域を選択します。次に、メディエーション グループのステータスを [有効] に設定し、[広告ユニットを追加] をクリックします。

このメディエーション グループを、既存の 1 つ以上の広告ユニット(AdMob )に関連付けます。[完了] をクリックします。

選択した広告ユニットが入力された広告ユニットカードが表示されます。

広告ソースとして Line を追加

[広告ソース] セクションの [ウォーターフォール] カードで、[広告のソースを追加] を選択します。Line を選択します。

[Line] を選択します。 次に、Line の eCPM の値を入力し、[続行] をクリックします。

Lineのマッピングがすでにある場合は、それを選択できます。それ以外の場合は、[マッピングを追加] をクリックします。

次に、前のセクションで取得した Application ID and Slot IDを入力します。[完了] をクリックします。

Step 3: Import the Line SDK and Adapter

Add the following line to your project's Podfile:

pod 'GoogleMobileAdsMediationLine'

From the command line run:

pod install --repo-update

Manual integration

  • Download the latest version of the Line SDK and link FiveAd.framework in your project.
  • Download the latest version of the Line adapter from the download link in Changelog and link LineAdapter.framework in your project.

Step 4: Add required code

SKAdNetwork integration

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

Step 5: Test your implementation

テスト広告を有効にする

AdMob。

Line のドキュメント の手順に沿って、LINE テスト広告を有効にします。

テスト広告を確認する

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

Optional steps

Network-specific parameters

The Line adapter supports an additional request parameter which can be passed to the adapter using the GADMediationAdapterLineExtras class. This class includes the following properties:

adAudio
Specifies the default sound start state of banner, interstitial and rewarded ads.

Here's a code example of how to create an ad request that sets these parameters:

Swift

import LineAdapter
// ...

let request = GADRequest()
let extras = GADMediationAdapterLineExtras()
extras.adAudio = GADMediationAdapterLineAdAudio.unmuted
// ...
request.register(extras)

Objective-C

#import <LineAdapter/LineAdapter.h>
// ...

GADRequest *request = [GADRequest request];
GADMediationAdapterLineExtras *extras = [[GADMediationAdapterLineExtras alloc] init];
extras.adAudio = GADMediationAdapterLineAdAudioUnmuted;
// ...
[request registerAdNetworkExtras:extras];

Using native ads

Ad rendering

The Line adapter populates the following Native ads advanced field descriptions for a GADNativeAd.

Field Assets always included by Line adapter
Headline
Image
Body
App icon 1
Call to action
Star rating
Store
Price

1 For native ads, the Line SDK does not provide an app icon asset. Instead, the Line adapter populates the app icon with a transparent image.

Error codes

If the adapter fails to receive an ad from Line, you can check the underlying error from the ad response using GADResponseInfo.adNetworkInfoArray under the following classes:

GADMediationAdapterLine

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

Error code Domain Reason
1-10 Sent by Line SDK Line SDK returned an SDK-specific error. See Line's documentation for more details.
101 com.google.ads.mediation.line Invalid server parameters (e.g. Missing Application ID or Slot ID).
102 com.google.ads.mediation.line The requested ad size does not match a Line supported banner ad size.
103 com.google.ads.mediation.line Failed to load an information icon image asset in native ad.

LINE iOS Mediation Adapter Changelog

Version 2.8.20240612.0

  • Added audio control for native ad via GADVideoOptions.
  • Verified compatibility with FiveAd SDK version 2.8.20240612.

Built and tested with:

  • Google Mobile Ads SDK version 11.5.0.
  • FiveAd SDK version 2.8.20240612.

Version 2.7.20240411.0

  • Verified compatibility with FiveAd SDK version 2.7.20240411.

Built and tested with:

  • Google Mobile Ads SDK version 11.3.0.
  • FiveAd SDK version 2.7.20240411.

Version 2.7.20240318.0

  • Verified compatibility with FiveAd SDK version 2.7.20240318.

Built and tested with:

  • Google Mobile Ads SDK version 11.2.0.
  • FiveAd SDK version 2.7.20240318.

Version 2.7.20240214.1

  • Now requires minimum iOS version 12.0.
  • Now requires Google Mobile Ads SDK version 11.0 or higher.
  • Included Info.plist in the frameworks within LineAdapter.xcframework.

Built and tested with:

  • Google Mobile Ads SDK version 11.0.1.
  • FiveAd SDK version 2.7.20240214.

Version 2.7.20240214.0

  • Verified compatibility with FiveAd SDK version 2.7.20240214.

Built and tested with:

  • Google Mobile Ads SDK version 11.0.1.
  • FiveAd SDK version 2.7.20240214.

Version 2.7.20240126.0

  • Verified compatibility with FiveAd SDK version 2.7.20240126.
  • Updated the adapter implementation with FiveAd SDK new delegate protocols.

Built and tested with:

  • Google Mobile Ads SDK version 10.14.0.
  • FiveAd SDK version 2.7.20240126.

Version 2.7.20231115.0

  • Verified compatibility with FiveAd SDK version 2.7.20231115.
  • Included GADMediationAdapterLineExtras header in the modulemap.

Built and tested with:

  • Google Mobile Ads SDK version 10.14.0.
  • FiveAd SDK version 2.7.20231115.

Version 2.6.20230609.1

  • Added GADMediationAdapterLineAudioState to manage the initial audio state of the banner, interstitial, and rewarded ad when it is first displayed.

Built and tested with:

  • Google Mobile Ads SDK version 10.14.0.
  • FiveAd SDK version 2.6.20230609.

Version 2.6.20230609.0

  • Initial release!
  • Added waterfall support for banner, interstitial, rewarded, and native ad formats.
  • Verified compatibility with FiveAd SDK version 2.6.20230609.

Built and tested with:

  • Google Mobile Ads SDK version 10.9.0.
  • FiveAd SDK version 2.6.20230609.