Integrating Tapjoy with Mediation

This guide is intended for publishers who want to use the Google Mobile Ads SDK to load and display ads from Tapjoy via mediation. It covers how to add Tapjoy to an ad unit's mediation configuration, how to set up Ad Network Optimization (ANO), and how to integrate the Tapjoy SDK and adapter into an Android app.

Supported formats and platforms

The AdMob mediation adapter for Tapjoy has the following capabilities:

Rewarded Video
Rewarded Video (new APIs)
Native Advanced
Smart Banners
Ad Network Optimization (ANO)


  • Android SDK 4.0 (API level 14) or later
  • Google Play services 17.2.0 or later

Step 1: Set up Tapjoy

Sign up or log in to your Tapjoy dashboard.

Add app

Add your app to the Tapjoy dashboard by going to the apps list on the top right and clicking the Add App button. You will be prompted to enter details about your app.

Fill out the form and click the Create Now button to add your app to Tapjoy dashboard.

You can skip the integration steps presented by Tapjoy and can move on to creating placements to be used with AdMob mediation.

Placement, virtual currency, and content


Navigate to Monetization > Placements and click the Create Placement button in the top right corner. Even if you have an existing placement, it's best to create a new one for AdMob, so it can be tracked and reported on separately.

Enter a Name for your placement, check the Mediation checkbox, and select AdMob from the drop down list. Click Create when done.

The Placement Name entered here will be used to set up your AdMob Ad Unit for mediation in the next section. "AdMob Mediation" has been used in this example, but you can call your placement whatever you like.

Virtual currency

Navigate to Monetization > Virtual Currency and click the Create Virtual Currency button in the top right corner.

Fill out the form and click Create now. Use NO_CALLBACK as the Callback URL. This ensures that the Tapjoy SDK avoids an unnecessary call to your server.


Navigate to Monetization > Create Content to create content to be shown with the placements.

For additional instructions on creating content, select the tab corresponding to your preferred ad format.


Click the Create button for the Interstitial Video content.

Provide a Name for the content and choose Android as the Platform.

Select the virtual currency created earlier as the Virtual Currency.

Select the Interstitial placement created earlier. Click the Save button at the bottom when finished to create your content.

Rewarded Video

Click the Create button for Rewarded Video content.

Provide a Name for the content and choose Android as the Platform.

Select the virtual currency created earlier as the Virtual Currency.

Select the Rewarded placement created earlier. Click the Save button at the bottom when finished to create your content.

SDK and reporting keys

In addition to the Placement Name, you also need the SDK Key, Publisher OAuth Key, and Mediation Key for setting up your AdMob ad unit.

Navigate to Settings > App Settings:

SDK key

Your SDK Key can be obtained from your App Info under the Application Platforms tab.

Publisher OAuth key

Your Publisher OAuth Key can be obtained in the same page under the API Keys tab.

Mediation Key

Your Mediation Key can be obtained in the same page under the Mediation Keys tab under the Reporting API Key column. It will be labeled as "AdMob."

Step 2: Configure mediation settings for your AdMob ad unit

You need to add Tapjoy to the mediation configuration for your Ad Unit. First sign in to your AdMob account.

Navigate to the Mediation tab. If you have an existing mediation group you'd like to modify, click the name of that mediation group to edit it, and skip ahead to Add Tapjoy as an ad source. Otherwise, to create a new mediation group, select Create Mediation Group.

Enter your ad format and platform, then click Continue.

Give your mediation group a name, and select locations to target. Next, set the mediation group status to Enabled. Then click Add Ad Units.

Ad units selection overlay

Associate this mediation group with your existing AdMob ad unit. Then click Done.

You should now see the ad units card populated with the ad units you selected as shown below:

Add Tapjoy as an ad source

In the Ad Sources card, select Add ad network.

Select Tapjoy and enable the Optimize switch. Enter your Publisher OAuth Key and Mediation Key obtained in the previous section to set up ANO for Tapjoy. Then enter an eCPM value for Tapjoy and click Continue.

Next, enter the SDK Key and Placement Name obtained in the previous section. Then click Done.

Finally, click Save.

Using rewarded video ads

In the settings for your rewarded video ad unit, provide values for the reward amount and reward type. Then, to ensure you provide the same reward to the user no matter which ad network is served, check the Apply to all networks in Mediation groups box.

If you don't apply this setting, the Tapjoy adapter defaults to a reward of type "" (empty string) with a value of 1. The Tapjoy SDK does not provide specific reward values for its rewarded video ads.

For more information on setting reward values for AdMob ad units, see Create an ad unit.

Step 3: Import the Tapjoy SDK and adapter

Add the following implementation dependency with the latest version of the Tapjoy SDK and adapter in the app-level build.gradle file:

dependencies {
    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation ''

Manual integration

Download the Tapjoy Android SDK and extract the tapjoyconnectlibrary.jar under the Libraries folder and add it to your project.

Download the latest Tapjoy adapter .aar file from Bintray, and add it to your project.

Step 4: Additional code required

No additional code is required for Tapjoy integration.

Step 5: Test your implementation

Test ads can be enabled on the Tapjoy dashboard under Settings > App Settings > Test Devices. Create a new test device using the device's Advertising ID as shown below:

Your device's Advertising ID can be located by navigating to Google > Ads in your device Settings.

Next, modify the content you created earlier.

To modify your content, first navigate to Monetization > Placements and click the User Initiated tab. Next, select the drop down for the content you want to edit, and choose Edit.

Under the content's Basic section, check the Only for Test Devices checkbox. Then click Save at the bottom of the page. That's it! You now have a working mediation integration with Tapjoy.

Optional steps

Under the Google EU User Consent Policy, you must ensure that certain disclosures are given to, and consents obtained from, users in the European Economic Area (EEA) regarding the use of device identifiers and personal data. This policy reflects the requirements of the EU ePrivacy Directive and the General Data Protection Regulation (GDPR). When seeking consent, you must identify each ad network in your mediation chain that may collect, receive, or use personal data and provide information about each network's use. Google currently is unable to pass the user's consent choice to such networks automatically.

The section below shows you how to enable or disable personalized ads for Tapjoy.

In Tapjoy SDK version 11.12.2, Tapjoy added a user consent API. The following sample code sets user consent to "1" on the Tapjoy SDK. If you choose to call this method, it is recommended that you do so prior to requesting ads via the Google Mobile Ads SDK.

import com.tapjoy.Tapjoy;
// ...

Tapjoy.setUserConsent("1"); //user does consent

See Tapjoy's Release Notes for more information.


For optimal performance, Tapjoy recommends adding the following optional permissions to your app's AndroidManifest.xml file:

<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>

Network-specific parameters

The Tapjoy adapter supports an additional request parameter which can be passed to the adapter using the TapjoyExtrasBundleBuilder class. The TapjoyExtrasBundleBuilder includes the following method:

  • setDebug(bool) - Enabling debug mode on Tapjoy SDK enables you to see various Tapjoy actions in the Tapjoy Developer Console. This param is supported for all ad formats.

Here's a code example of how to set these ad request parameters:


Bundle extras = new TapjoyAdapter.TapjoyExtrasBundleBuilder()
AdRequest adRequest = new AdRequest.Builder()
          .addNetworkExtrasBundle(TapjoyAdapter.class, extras)


val extras = TapjoyExtrasBundleBuilder()
val adRequest = AdRequest
          .addNetworkExtrasBundle(, extras)

Şunun hakkında geri bildirim gönderin...

Yardım mı gerekiyor? Destek sayfamızı ziyaret edin.