FeedAd Google Ads Integration

The FeedAd Android SDK can be easily combined with ads served through the Google Ads SDK for Android. It supports ads served through Google Ad Manager and Google AdMob.

FeedAd can be integrated into a waterfall mediation by using Custom Events (Google Ad Manager, AdMob).
There is no coding required, FeedAd provides a plugin that can be used as a dependency alongside the FeedAd SDK.

To see an example, please check out our Android demo app.

Supported Ad Types

The following ad types are supported by the Adapter Plugin:

  • Banner
  • Interstitial

Integration

1. App Dependencies

Add implementation 'com.feedad.android:feedad-gam:1.1.0' to the dependency list of your app.

Make sure, that you've got all three required dependencies listed:

dependencies {
    // Includes the Google Ads SDK
    implementation 'com.google.android.gms:play-services-ads:23.6.0'

    // Includes the FeedAd SDK
    implementation('com.feedad.android:feedad-sdk:1.7.1') {
        transitive = true
    }

    // Plugin that connects Google Ads with the FeedAd SDK 
    implementation 'com.feedad.android:feedad-gam:1.1.0'

    //...
}

2. Custom Event Configuration

Create and configure the Custom Event in the UI of your Google Ads Dashboard:

Use the class name: com.feedad.android.gam.FeedAdMediationAdapter with these parameters:

{
  "clientToken": "your client token",
  "placementId": "your-placement-id"
}

Placement ID?

You can choose placement IDs yourself. A placement ID should be named after the ad position inside your product. For example, if you want to display an ad inside a list of news articles, you could name it "ad-news-overview".
A placement ID may consist of lowercase a-z, 0-9, - and _. You do not have to manually create the placement IDs before using them. Just specify them within the code, and they will appear in the FeedAd admin panel after the first request. Learn more about Placement IDs and how they are grouped to play the same Creative

3. Specify additional parameters

You may specify additional parameters inside the JSON:

Name Type Required Default Description
clientToken String yes n/a required, the FeedAd client token of your FeedAd publisher account.
placementId String yes n/a
debug Boolean no false if the FeedAd SDK will print debug messages into the logcat.
waitForConsent Boolean no false if the SDK will wait for the response of an IAB CMP (TCF or GPP).
locationData Boolean no false if the SDK is allowed to send geolocation data alongside ad requests.
cancelable Boolean no false interstitial only. If the user can cancel the interstitial at any time by pressing the back button.

A full configuration object would look like this:

{
  "clientToken": "your client token",
  "placementId": "your-placement-id",
  "debug": true,
  "waitForConsent": true,
  "locationData": true,
  "cancelable": true
}

Ad View Customizations

Placeholder Image

You can specify a placeholder drawable that is shown inside the ad view if FeedAd has completed its ad playback and the view is still visible. This is especially required for banner ads, because of a minor conflict between Google Ads and FeedAd, and how they display banner ads:

  1. Google Ads shows banner ads indefinitely.
  2. FeedAd plays mostly video ad playlists with videos of different lengths.
  3. Google Ads lacks the ability to trigger the reloading of an ad view from within an adapter.

This can cause a situation wherein FeedAd has no more ads to play but is still visible within the Google Ads ad view. For example:

  1. Google Ads loads FeedAd into a banner ad, that the user has in view for 40s.
  2. FeedAd plays a playlist of a 20s and 15s long videos.
  3. When FeedAd completes its playlist, the ad view will still be visible for 5s to the user.

Those 5 seconds can be filled with a static placeholder drawable or color. If none is given, FeedAd will default to gray. For banner ads, the placeholder image will bridge the loading gap in between video ads, and the transition from FeedAd to the ad of any other ad adapter.

You can configure the placeholder image by setting a value for the attribute gamFeedAdPlaceholderImage in your app's theme. This attribute accepts any drawable resource or raw color value.

<!-- Your app theme -->
<style name="AppTheme" parent="Theme.AppCompat.Light">
    <!-- drawable resource -->
    <item name="gamFeedAdPlaceholderImage">@drawable/some_drawable</item>
    <!-- or color resource -->
    <item name="gamFeedAdPlaceholderImage">@color/some_color</item>
    <!-- or raw color -->
    <item name="gamFeedAdPlaceholderImage">#FeedAd</item>
</style>

Loading Indicator

You can specify, if the loading indicator should be shown for banner ads. This option can be used in combination with the placeholder image, to show a graphic in-between ads that, is not overlaid by a loading spinner.

By default, the loading indicator will be shown.

You can configure the placeholder image by setting a value for the attribute gamFeedAdShowLoadingIndicator in your app's theme:

<!-- Your app theme -->
<style name="AppTheme" parent="Theme.AppCompat.Light">
    <item name="gamFeedAdShowLoadingIndicator">false</item>
</style>

Integration Support

Please don't hesitate to contact your FeedAd account manager, ff you experience any issues with integrating FeedAd into a Google Ads mediation.

You can also view the code of our Android demo app, for a technical example.