Skip to main content
Table of contents

Introduction

This guide explains integrating the Commerce Grid App solution to your Android app with the Admob mediation platform.

The criteo mediation adapter is open-source and available on GitHub.

Prerequisites
Compatibility
  • Criteo SDK v4.8.0 is compatible with Google Mobile Ads SDK v20.0+ but IS NOT backward compatible. If you are using Google SDK v19 or below, use Criteo SDK v4.7.0.

Import Criteo Adapter via Maven

Make sure that mavenCentral() repository is already declared in your project-level build.gradle:

allprojects { repositories { google() mavenCentral() } }

Then, in your app's build.gradle, add the following line to the "dependencies" section in order to import Criteo adapter and its dependencies.

dependencies { implementation 'com.criteo.mediation.google:criteo-adapter:4.4.0.0' }

Once done, save the file and perform a Gradle sync.

Additional Code

There are no additional code required

Configure Mediation Settings - Mediation Group

If you have no existing Mediation Group, create a New Mediation Group for your app.

On the sidebar of your Admob account, select Mediation and click on CREATE MEDIATION GROUP button.

Configure Mediation Settings - Add Criteo as Ad Sources

In your Mediation Group, click on the ADD CUSTOM EVENT button in the Ad Sources section.

Add Criteo as your Custom Event label, and fill in the eCPM value as agreed with your Criteo representative. Click Continue.

Configure Mediation Settings - Configure Criteo Ad Units

On the next screen:

  • Class Name: Enter com.criteo.mediation.google.CriteoAdapter

  • Parameter: {"cpId":"B-xxxxxx","adUnitId":"ca-app-pub-xxxxxxxxxxxx/xxxxxx", "inventoryGroupId":"ABC123"}

    • cpId: Your Criteo Publisher ID. Contact your Criteo representative to get your Criteo Publisher ID.

    • adUnitId: Admob Ad Unit ID targeted by this mediation group

    • inventoryGroupId: Your Commerce Grid Inventory Group ID (aka. publisher id). Contact your technical account manager to get your Inventory Group Id.

Alternatively, simply use the Criteo Mediation Parameter Generator

The same configuration is used for all ad formats, including Banner, Interstitial, and Advanced Native.

Click Done to save the configuration.

Advanced Mediation Setup

In order to optimize your Criteo revenue, we recommend implementing several Criteo lines for different price points targeting the same placement. To do this, we'll need to use custom Criteo adUnitId on the Parameter field.

For example, if you would like to have three price points for Criteo and your Admob adUnitId is myadunitid, you can create 3 Criteo ad sources in your mediation group targeting this ad unit, each with the parameter:

  • {"cpId":"xxxxxx","adUnitId":"myadunitid_highcpm"}

  • {"cpId":"xxxxxx","adUnitId":"myadunitid_medcpm"}

  • {"cpId":"xxxxxx","adUnitId":"myadunitid_lowcpm"}

Please contact your Criteo representative to set up your custom Criteo adUnitId or for more information.