<br />

> [!NOTE]
> **Note:** Vungle is now Liftoff Monetize.

This guide shows you how to use Google Mobile Ads SDK for React Native to load and display
ads from Liftoff Monetize using
[mediation](https://developers.google.com/admob/react-native/mediation.md.txt), covering both bidding and
waterfall integrations. It covers how to add
Liftoff Monetize to an ad unit's
mediation configuration, and how to integrate the
Liftoff Monetize SDK and adapter into a
React Native app.

## Supported integrations and ad formats

| Integration ||
|---|---|
| Bidding | Yes |
| Waterfall | Yes |
| App Open | Yes |
| Banner | Yes |
| Interstitial | Yes |
| Rewarded | Yes |
| Rewarded Interstitial | Yes |
| Native | Yes |

## Prerequisites

Before you continue, verify the following:

- Latest Google Mobile Ads SDK for React Native version.
- React Native framework version 0.85.0 or later.
- To deploy on Android
  - Android API level 24 or later.
- To deploy on iOS
  - iOS deployment target of 13.0 or later.
- A working React Native project configured with Google Mobile Ads SDK for React Native. See [Set up Google Mobile Ads SDK for React Native](https://developers.google.com/admob/react-native/quick-start.md.txt) for details.
  - Make sure you have downloaded and extracted the `adapters` folder from the [`gma-sdk-react-native`](https://drive.google.com/corp/drive/folders/1s5j2kx0yyYxLsdLNyBrhNJvkzmaUgOwD) folder. If you don't have the `adapters` folder, follow steps one, two, and three in [Install Google Mobile Ads SDK for React Native](https://developers.google.com/admob/react-native/quick-start.md.txt#install).
- [Set up AdMob Mediation](https://developers.google.com/admob/react-native/mediation.md.txt).

## Step 1: Set up configurations in Liftoff Monetize UI

[Sign up](https://vungle.com/signup) or [log in](https://vungle.com/login/) to your Liftoff
Monetize account.

Add your app to the [Liftoff Monetize dashboard](https://publisher.vungle.com/applications)
by clicking the **Add Application** button.

![](https://developers.google.com/static/admob/images/mediation/liftoff-monetize/dashboard_add_app.png)

Fill out the form, entering all the necessary details.

### Android

![](https://developers.google.com/static/admob/images/mediation/liftoff-monetize/create_app_Android.png)

### iOS

![](https://developers.google.com/static/admob/images/mediation/liftoff-monetize/create_app_iOS.png)

Once your app is created, select your app from the
[Liftoff Monetize Applications dashboard](https://publisher.vungle.com/applications).

### Android

![](https://developers.google.com/static/admob/images/mediation/liftoff-monetize/dashboard_app_list_Android.png)

### iOS

![](https://developers.google.com/static/admob/images/mediation/liftoff-monetize/dashboard_app_list_iOS.png)

Take note of the **App ID**.

### Android

![](https://developers.google.com/static/admob/images/mediation/liftoff-monetize/view_app_details_Android.png)

### iOS

![](https://developers.google.com/static/admob/images/mediation/liftoff-monetize/view_app_details_iOS.png)

### Add new placements

To create a new placement to be used with AdMob Mediation, navigate to the
[Liftoff Monetize Placements dashboard](https://publisher.vungle.com/placements),
click the **Add Placement** button and select your app from the drop-down
list.

> [!NOTE]
> **Note:** While Liftoff Monetize automatically creates a "default" placement when you first create your app, we recommend creating a new placement for mediation with AdMob.

![](https://developers.google.com/static/admob/images/mediation/liftoff-monetize/add_new_placement.png)

Details for adding new placements are included below:

### App Open

Select **Interstitial** and enter a **Placement Name** . Then, select **Yes**
for **Skippable** and fill out the rest of the form. \[Bidding only\] Under
**Monetization** , toggle the **In-App Bidding** switch to **Enabled** .
Click the **Continue** button at the bottom of the page to create the
placement.

![](https://developers.google.com/static/admob/images/mediation/liftoff-monetize/placement_create_interstitial.png)

### Banner

Select **Banner** , enter a **Placement Name** and fill out the rest of the
form. \[Bidding only\] Under **Monetization** , toggle the **In-App Bidding**
switch to **Enabled** . Click the **Continue** button at the bottom of the
page to create the placement.

![](https://developers.google.com/static/admob/images/mediation/liftoff-monetize/placement_create_banner.png)

### 300x250 Banner

Select **MREC** , enter a **Placement Name** and fill out the rest of the
form. \[Bidding only\] Under **Monetization** , toggle the **In-App Bidding**
switch to **Enabled** . Click the **Continue** button at the bottom of the
page to create the placement.

![](https://developers.google.com/static/admob/images/mediation/liftoff-monetize/placement_create_banner_mrec.png)

### Interstitial

Select **Interstitial** , enter a **Placement Name** , and fill out the rest
of the form. \[Bidding only\] Under **Monetization** , toggle the
**In-App Bidding** switch to **Enabled** . Click the **Continue** button at
the bottom of the page to create the placement.

![](https://developers.google.com/static/admob/images/mediation/liftoff-monetize/placement_create_interstitial.png)

### Rewarded

Select **Rewarded** , enter a **Placement Name** and fill out the rest of the
form. \[Bidding only\] Under **Monetization** , toggle the **In-App Bidding**
switch to **Enabled** . Click the **Continue** button at the bottom of the
page to create the placement.

![](https://developers.google.com/static/admob/images/mediation/liftoff-monetize/placement_create_rewarded.png)

### Rewarded Interstitial

> [!NOTE]
> **Note:** Rewarded interstitial requires assistance to set up. Reach out to your account manager at Liftoff Monetize or `monetize@liftoff.io`.

Select **Rewarded** . Enter a **Placement Name** , enable **Skippable** and
fill out the rest of the form. \[Bidding only\] Under **Monetization** , toggle
the **In-App Bidding** switch to **Enabled** . Click the **Continue** button
at the bottom of the page to create the placement.

> [!IMPORTANT]
> **Important:** For rewarded interstitial ads, the skippable timing cannot be 0. Contact your Liftoff Monetize account manager to adjust it.

![](https://developers.google.com/static/admob/images/mediation/liftoff-monetize/placement_create_rewarded_interstitial.png)

### Native

Select **Native** , enter a **Placement Name** and fill out the rest of the
form. \[Bidding only\] Under **Monetization** , toggle the **In-App Bidding**
switch to **Enabled** . Click the **Continue** button at the bottom of the
page to create the placement.

> [!NOTE]
> **Note:** The **In-App Bidding** toggle is not available for native ads by default. To enable it, reach out to your Liftoff Monetize account manager.

![](https://developers.google.com/static/admob/images/mediation/liftoff-monetize/placement_create_native.png)

Take note of the **Reference ID** and click **Sounds Good**.

### App Open

![](https://developers.google.com/static/admob/images/mediation/liftoff-monetize/placement_details_app_open.png)

### Banner

![](https://developers.google.com/static/admob/images/mediation/liftoff-monetize/placement_details_banner.png)

### 300x250 Banner

![](https://developers.google.com/static/admob/images/mediation/liftoff-monetize/placement_details_banner_mrec.png)

### Interstitial

![](https://developers.google.com/static/admob/images/mediation/liftoff-monetize/placement_details_interstitial.png)

### Rewarded

![](https://developers.google.com/static/admob/images/mediation/liftoff-monetize/placement_details_rewarded.png)

### Rewarded Interstitial

![](https://developers.google.com/static/admob/images/mediation/liftoff-monetize/placement_details_rewarded_interstitial.png)

### Native

![](https://developers.google.com/static/admob/images/mediation/liftoff-monetize/placement_details_native.png)

### Locate your Reporting API Key

### Bidding

This step isn't required for bidding integrations.

### Waterfall

In addition to the **App ID** and the **Reference ID** , you'll also need
your Liftoff Monetize **Reporting API Key** to set up your
AdMob ad unit ID. Navigate to the
[Liftoff Monetize Reports dashboard](https://publisher.vungle.com/reports) and
click the **Reporting API Key** button to view your **Reporting API
Key**.

![](https://developers.google.com/static/admob/images/mediation/liftoff-monetize/api_key.png)

### Update your app-ads.txt


[Authorized Sellers for Apps app-ads.txt](https://iabtechlab.com/wp-content/uploads/2019/03/app-ads.txt-v1.0-final-.pdf) 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](https://support.google.com/admob/answer/9363762).

To implement `app-ads.txt` for Liftoff Monetize,
[download](https://publisher.vungle.com/vungleAdsTxt) and append Liftoff Monetize's
`app-ads.txt` entries to your existing `app-ads.txt` file. For more
information, see
[app-ads.txt](https://support.vungle.com/hc/en-us/articles/360055891252-app-ads-txt).

### Turn on test mode

To enable test ads, go to your Liftoff Monetize dashboard and navigate to
**Applications**.

Select your app for which you would like to enable test ads under the
**Placement Reference ID** section of your app. Test ads can be enabled by
selecting **Test Mode** to **Show test ads only** under the **Status** section.

### Android

![](https://developers.google.com/static/admob/images/mediation/liftoff-monetize/test_mode_Android.png)

### iOS

![](https://developers.google.com/static/admob/images/mediation/liftoff-monetize/test_mode_iOS.png)

## Step 2: Set up Liftoff Monetize demand in AdMob UI

### Configure mediation settings for your ad unit

### Android

For instructions, see step 2 in the guide for

[Android](https://developers.google.com/admob/android/mediation/liftoff-monetize.md.txt#step-2).

### iOS

For instructions, see step 2 in the guide for

[iOS](https://developers.google.com/admob/ios/mediation/liftoff-monetize.md.txt#step-2).

### Add Liftoff to GDPR and US state regulations ad partners list

> [!IMPORTANT]
> **Important:** Verify that you have **Account Management** permission to complete the configuration for EU Consent and GDPR, US State regulations, and User Messaging Platform. See [Manage user access to your
> account](https://support.google.com/admob/answer/2784628) for details.

Follow the steps in

[European regulations settings](https://support.google.com/admob/answer/10113004#adding_ad_partners_to_published_gdpr_messages)

and

[US state regulations settings](https://support.google.com/admob/answer/14125907)


to add **Liftoff** to the
European and US state regulations ad partners list in the AdMob UI.


## Step 3: Import the Liftoff Monetize SDK and adapter

> [!NOTE]
> **Note:** Failure to integrate the compatible Liftoff Monetize and Google Mobile Ads SDK for React Native SDK versions might lead to build issues.

In your project's root directory, install the Google Mobile Ads SDK for React Native
mediation adapter for Liftoff Monetize.
Complete the following:

1. Copy the Google Mobile Ads SDK for React Native adapter tar file from the
   `gma-sdk-react-native/adapters/liftoff-monetize/`
   directory into your project's `local_packages/` directory. If you don't have
   the `adapters` folder, see [Prerequisites](https://developers.google.com/admob/react-native/mediation/liftoff-monetize.md.txt#prerequisites).

   ```bash
   mkdir -p local_packages
   cp EXTRACT_DIR/gma-sdk-react-native/adapters/liftoff-monetize/gma-mediation-liftoffmonetize-0.1.0.tgz local_packages/
   ```

   Replace <var class="readonly" translate="no">EXTRACT_DIR</var> with the path to the
   directory where you extracted the archive.
2. Install the adapter package using your preferred package manager:

   ### npm

   ```bash
   npm install ./local_packages/gma-mediation-liftoffmonetize-0.1.0.tgz
   ```

   ### yarn

   ```bash
   yarn add ./local_packages/gma-mediation-liftoffmonetize-0.1.0.tgz
   ```


## Step 4: Implement privacy settings on the Liftoff Monetize SDK

### EU consent and GDPR


To [comply with
the Google EU User Consent Policy](https://www.google.com/about/company/consentstaging.html), you must make certain disclosures to your
users in the European Economic Area (EEA), the UK, and Switzerland, and obtain
their consent for the use of cookies or other local storage where legally
required, and for the collection, sharing, and use of personal data for ads
personalization. This policy reflects the requirements of the EU ePrivacy
Directive and the General Data Protection Regulation (GDPR). You are
responsible for verifying that consent is propagated to each ad source in your
mediation chain.

Liftoff Monetize React Native adapter version
N/A
and later supports passing GDPR consent signals from consent management
platforms that integrate with IAB's Transparency and Consent Framework (TCF)
to Liftoff Monetize SDK.
For more information, see
GDPR Recommended Implementation Instructions for
[Android](https://support.vungle.com/hc/en-us/articles/360047780372-Advanced-Settings#h_01JV5KSP78CFHB1J50JHQTW988)
and
[iOS](https://support.vungle.com/hc/en-us/articles/360048572411-Advanced-Settings#h_01JV5D5KQRW58DPGBQ5WQ1JP8C).

### US state privacy laws


[US states privacy laws](https://support.google.com/admob/answer/9561022)
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 through a prominent "Do Not Sell My Personal
Information" link on the "selling" party's homepage. The
[US states privacy
laws compliance guide](https://developers.google.com/admob/react-native/privacy/us-states) offers the ability to enable
[restricted data processing](https://privacy.google.com/businesses/rdp/)
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 following sample code demonstrates how to pass consent information to the
Liftoff Monetize adapter manually:

```typescript
import { LiftoffMonetizeMediation } from '@google/gma-mediation-liftoffmonetize';
// ...

LiftoffMonetizeMediation.setCCPAStatus({ optedIn: true });
```

See CCPA recommended implementation instructions for
[Android](https://support.vungle.com/hc/en-us/articles/360047780372-Advanced-Settings#h_01JV5KSP78232R87X1T4Z54H7Y)
and
[iOS](https://support.vungle.com/hc/en-us/articles/360048572411-Advanced-Settings#h_01JV5D5KQRFCQ9FMRHDAMCBR02)
for more details and
the values that can be provided in the method.

## Step 5: Add required code

### Android

No additional code is required for
Liftoff Monetize integration.

### iOS

### SKAdNetwork integration

Follow [Liftoff Monetize's
documentation](https://support.vungle.com/hc/en-us/articles/360002925791-Integrate-Vungle-SDK-for-iOS#h_01GWQTCFD182A6NRBT9PZ96FXY)
to add the SKAdNetwork identifiers to your project's `Info.plist` file.

## Step 6: Test your implementation

### Enable test ads

Make sure you
[register your test device](https://developers.google.com/admob/react-native/test-ads.md.txt#enable_test_devices)
for

AdMob and [enable test mode](https://developers.google.com/admob/react-native/mediation/liftoff-monetize.md.txt#turn-on-test-mode) in
Liftoff Monetize UI.


> [!IMPORTANT]
> **Important:** Disable test mode for AdMob and Liftoff Monetize before releasing your app.

### Verify test ads

To verify that you are receiving test ads from
Liftoff Monetize,
enable
[single ad source testing](https://developers.google.com/admob/react-native/ad-inspector#single_ad_source_testing)
in ad inspector using the
**Liftoff Monetize (Bidding) and Liftoff Monetize (Waterfall)** ad source(s).

## Error codes

If the adapter fails to receive an ad from Liftoff Monetize, publishers can
check the underlying error from the ad response using
[`ResponseInfo`](https://developers.google.com/admob/react-native/response-info.md.txt) under the following classes:

### Android

| Format | Class name |
|---|---|
| App Open (Bidding) | com.google.ads.mediation.vungle.VungleMediationAdapter |
| App Open (Waterfall) | com.google.ads.mediation.vungle.VungleMediationAdapter |
| Banner (Bidding) | com.google.ads.mediation.vungle.VungleMediationAdapter |
| Banner (Waterfall) | com.vungle.mediation.VungleInterstitialAdapter |
| Interstitial (Bidding) | com.google.ads.mediation.vungle.VungleMediationAdapter |
| Interstitial (Waterfall) | com.vungle.mediation.VungleInterstitialAdapter |
| Rewarded (Bidding) | com.google.ads.mediation.vungle.VungleMediationAdapter |
| Rewarded (Waterfall) | com.vungle.mediation.VungleAdapter |
| Rewarded Interstitial (Bidding) | com.google.ads.mediation.vungle.VungleMediationAdapter |
| Rewarded Interstitial (Waterfall) | com.google.ads.mediation.vungle.VungleMediationAdapter |

### iOS

| Format | Class name |
|---|---|
| App Open (Bidding) | GADMediationAdapterVungle |
| App Open (Waterfall) | GADMediationAdapterVungle |
| Banner (Bidding) | GADMediationAdapterVungle |
| Banner (Waterfall) | GADMAdapterVungleInterstitial |
| Interstitial (Bidding) | GADMediationAdapterVungle |
| Interstitial (Waterfall) | GADMAdapterVungleInterstitial |
| Rewarded (Bidding) | GADMediationAdapterVungle |
| Rewarded (Waterfall) | GADMAdapterVungleRewardBasedVideoAd |
| Rewarded Interstitial (Bidding) | GADMediationAdapterVungle |
| Rewarded Interstitial (Waterfall) | GADMediationAdapterVungle |

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

### Android

| Error code | Reason |
|---|---|
| 101 | Invalid server parameters (e.g. app ID or placement ID). |
| 102 | The requested banner size does not map to a valid Liftoff Monetize ad size. |
| 103 | Liftoff Monetize requires an `Activity` context to request ads. |
| 104 | The Vungle SDK cannot load multiple ads for the same placement ID. |
| 105 | The Vungle SDK failed to initialize. |
| 106 | Vungle SDK returned a successful load callback, but Banners.getBanner() or Vungle.getNativeAd() returned null. |
| 107 | Vungle SDK is not ready to play the ad. |
| 108 | Vungle SDK returned invalid bidding token. |

### iOS

| Error code | Reason |
|---|---|
| 101 | Invalid server parameters (e.g. app ID or placement ID). |
| 102 | An ad is already loaded for this network configuration. Vungle SDK cannot load a second ad for the same placement ID. |
| 103 | The requested ad size does not match a Liftoff Monetize supported banner size. |
| 104 | Vungle SDK couldn't render the banner ad. |
| 105 | Vungle SDK only supports loading 1 banner ad at a time, regardless of placement ID. |
| 106 | Vungle SDK sent a callback saying the ad is not playable. |
| 107 | Vungle SDK is not ready to play the ad. |

For errors that come from the Vungle SDK, refer to [Error Codes: Vungle SDK for iOS and Android](https://support.vungle.com/hc/en-us/articles/15661036969627-Error-Codes-Vungle-SDK-for-iOS-and-Android).

#### Version 0.1.0

- Initial release.

<!-- -->

- Supports [Liftoff Monetize Android adapter version 7.7.8.1](https://github.com/googleads/googleads-mobile-android-mediation/blob/main/ThirdPartyAdapters/vungle/CHANGELOG.md#version-7781).
- Supports [Liftoff Monetize iOS adapter version 7.7.7.0](https://github.com/googleads/googleads-mobile-ios-mediation/blob/main/adapters/Vungle/CHANGELOG.md#version-7770).
- Built and tested with the Google Mobile Ads React Native Plugin version 0.1.0.