Integrate LY Ads Network with mediation

  • This guide explains how to integrate the LINE Ads Network with the Google Mobile Ads SDK for mediation in Unity, focusing on waterfall integrations.

  • The AdMob mediation adapter for LINE Ads Network supports Bidding and Waterfall integrations, along with Banner, Interstitial, and Rewarded ad formats.

  • Integrating the LINE Ads Network requires specific versions of the Google Mobile Ads SDK, Unity, and the LINE Ads Network mediation plugin, as well as platform-specific requirements for Android and iOS.

  • Setting up the LINE Ads Network involves configuring applications and ad placements within the LINE Ads Network UI and updating your app-ads.txt file.

  • The guide provides instructions on how to import the LINE Ads Network SDK and adapter using OpenUPM-CLI, OpenUPM, or a Unity Package.

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

Supported integrations and ad formats

The AdMob mediation adapter for LY Ads Network has the following capabilities:

Integration
Bidding
Waterfall
Formats
Banner
Interstitial
Rewarded

Prerequisites

Before you continue, verify the following:

  • Latest Google Mobile Ads Unity Plugin version.
  • Unity Editor version 4 or later.
  • [For bidding]: To integrate all supported ad formats in bidding, use Google Mobile Ads mediation plugin for LY Ads Network 1.5.0 or later (latest version recommended).
  • To deploy on Android
    • Android API level 24 or later.
  • To deploy on iOS
    • iOS deployment target of 13.0 or later.
  • A working Unity project configured with Google Mobile Ads Unity Plugin. See Set up Google Mobile Ads Unity Plugin for details.
  • Set up AdMob Mediation.
  • Step 1: Set up configurations in LY Ads Network UI

    Sign up and log in to your LY Ads Network account.

    Add a new application

    Navigate to the App tab and click the New registration button.

    New Registration

    Fill out the form and click registration.

    New Registration Form

    Take note of the App ID.

    Android

    Registration Details

    iOS

    Registration Details

    Create an ad slot

    On the App tab, select your app to view your app's details. Under the Slot section, click Add.

    Add Slot

    Fill out the form for details about the slot. For Bidding Type, select Standard to configure this slot for waterfall mediation, or Google SDK Bidding to configure this slot for Bidding. Click Create once the form is filled.

    Add Slot Form

    Take note of the Slot ID.

    Slot Details

    After you create your first slot, click Review on your app's detail page to get approval from LY Ads Network. This may take some time. Contact your LY Ads Network representative if you have any questions.

    Request Review

    Create a Reporting API Key

    Navigate to the Managing reporting API keys tab and click the Create API key button.

    Reporting API Key Tab

    Fill out the form and click Save.

    Reporting API Key Form

    Take note of your API Key ID and API Key Secret.

    Reporting API Key Form

    Update your app-ads.txt

    Authorized Sellers for Apps app-ads.txt is an IAB Tech Lab initiative that helps ensure your app ad inventory is only sold through channels you've identified as authorized. To prevent a significant loss in ad revenue, you'll need to implement an app-ads.txt file. If you haven't done so already, set up an app-ads.txt file for your app.

    To implement app-ads.txt for LY Ads Network, see About app-ads.txt.

    Step 2: Set up LY Ads Network demand in AdMob UI

    Configure mediation settings for your ad unit

    Android

    For instructions, see step 2 in the guide for Android.

    iOS

    For instructions, see step 2 in the guide for iOS.

    Step 3: Import the LY Ads Network SDK and adapter

    OpenUPM-CLI

    If you have OpenUPM-CLI installed, you can install the Google Mobile Ads LY Ads Network Mediation Plugin for Unity to your project by running the following command from your project's root directory:

    openupm add com.google.ads.mobile.mediation.line

    OpenUPM

    In your Unity project editor, select Edit > Project Settings > Package Manager to open the Unity Package Manager Settings.

    Under the Scoped Registries tab, add OpenUPM as a scoped registry with the following details:

    • Name: OpenUPM
    • URL: https://package.openupm.com
    • Scope(s): com.google

    OpenUPM Details

    Then, navigate to Window > Package Manager to open the Unity Package Manager and select My Registries from the drop-down menu.

    Unity Registries

    Select the Google Mobile Ads Line Mediation package and click Install.

    Install from OpenUPM

    Unity Package

    Download the latest version of Google Mobile Ads mediation plugin for LY Ads Network from the download link in the Changelog and extract the GoogleMobileAdsLineMediation.unitypackage from the zip file.

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

    Import from Unity

    Then, select Assets > External Dependency Manager > Android Resolver > Force Resolve. The External Dependency Manager library will perform dependency resolution from scratch and copy the declared dependencies into the Assets/Plugins/Android directory of your Unity app.

    Force Resolve

    Step 4: Add required code

    Android

    No additional code is required for LY Ads Network integration.

    iOS

    SKAdNetwork integration

    Follow LY Ads Network's documentation to add the SKAdNetwork identifiers to your project's Info.plist file.

    Step 5: Test your implementation

    Enable test ads

    Make sure you register your test device for AdMob.

    Verify test ads

    To verify that you are receiving test ads from LY Ads Network, enable single ad source testing in ad inspector using the LY Ads Network ad source(s).

    Optional steps

    Network-specific parameters

    The LY Ads Network Unity mediation plugin supports the following additional request parameter which can be passed to the adapter through the LineMediationExtras class:

    • SetEnableAdSound(boolean) : 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:

    using GoogleMobileAds.Api;
    using GoogleMobileAds.Mediation.Line.Api;
    // ...
    
    var adRequest = new AdRequest();
    var lineExtras = new LineMediationExtras();
    lineExtras.SetEnableAdSound(true);
    adRequest.MediationExtras.Add(lineExtras);
    

    Error codes

    If the adapter fails to receive an ad from LY Ads Network, publishers can check the underlying error from the ad response using ResponseInfo under the following classes:

    Android

    com.line.ads
    com.google.ads.mediation.line.LineMediationAdapter
    

    iOS

    GADMediationAdapterLine
    

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

    Android

    Error code Domain Reason
    1-10 com.five_corp.ad LY Ads Network SDK returned an SDK-specific error. See LY Ads Network's documentation for more details.
    101 com.google.ads.mediation.line Missing or invalid Application ID.
    102 com.google.ads.mediation.line Missing or invalid Slot ID.
    103 com.google.ads.mediation.line The requested ad size does not match a LY Ads Network supported banner ad size.
    104 com.google.ads.mediation.line Failed to load an interstitial or rewarded ad due to missing activity context.
    105 com.google.ads.mediation.line LY Ads Network SDK failed to show an interstitial or rewarded ad.
    106 com.google.ads.mediation.line Failed to load a native ad due to missing assets.
    107 com.google.ads.mediation.line FiveAd SDK returned a null ad loader.

    iOS

    Error code Domain Reason
    1-10 Sent by LY Ads Network SDK LY Ads Network SDK returned an SDK-specific error. See LY Ads Network'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 LY Ads Network supported banner ad size.
    103 com.google.ads.mediation.line Failed to load an information icon image asset in native ad.
    104 com.google.ads.mediation.line Failed to collect signals for bidding.
    105 com.google.ads.mediation.line Failed to initialize the LINE Ads SDK ad loader.

    Line Unity Mediation Plugin Changelog

    Version 2.2.1

    Version 2.2.0

    Version 2.1.1

    Version 2.1.0

    Version 2.0.2

    Version 2.0.1

    Version 2.0.0

    Version 1.5.10

    Version 1.5.9

    Version 1.5.8

    Version 1.5.7

    Version 1.5.6

    Version 1.5.5

    • Fixed an issue where installing through OpenUPM caused the plugin to not import the packages properly.

    Version 1.5.4

    Version 1.5.3

    Version 1.5.2

    Version 1.5.1

    Version 1.5.0

    Version 1.4.0

    Version 1.3.1

    Version 1.3.0

    Version 1.2.0

    Version 1.1.2

    Version 1.1.1

    Version 1.1.0

    Version 1.0.0