Integrating Tapjoy with Open Bidding Mediation

This guide is intended for publishers who want to use the Google Mobile Ads SDK to load and display ads from Tapjoy via Open Bidding mediation. It covers how to add Tapjoy to an ad unit's mediation configuration and how to integrate the Tapjoy SDK and adapter into a Unity app.

Supported ad formats and features

Formats
Banners
Interstitials
Rewarded Video
Features
Smart Banners

Requirements

  • Unity 4 or higher
  • To deploy on Android
    • Early access build of Google Mobile Ads Android SDK
    • Android API level 14 or higher
  • To deploy on iOS
    • Google Mobile Ads SDK 7.42.2 or higher
    • Xcode 9.2 or higher
    • iOS Deployment target of 8.0 or higher
  • Follow the Open Bidding Get Started guide to import the early access build of the Google Mobile Ads SDKs
  • Complete Initialize the Mobile Ads SDK section of the Get Started guide

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 in the top-right corner 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 the Tapjoy dashboard.

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

Android

iOS

Placement, virtual currency, and content

Placement

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 dropdown 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.

If your app supports both platforms, you need to create two virtual currencies, one for each.

Android

iOS

Content

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. If your app supports both platforms, you need to create two contents, one for each.

Android Interstitial

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.

Android Rewarded

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.

iOS Interstitial

Click the Create button under Interstitial Video content.

Provide a Name for the content and choose iOS 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.

iOS Rewarded

Click the Create button under Rewarded Video content.

Provide a Name for the content and choose iOS 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 key

In addition to the Placement Name, you also need the SDK Key to set up your AdMob ad unit.

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

Android

iOS

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. Next, 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 to Add Tapjoy as an ad source.

To create a new mediation group, select Create Mediation Group.

Enter your ad format and platform, then click Continue.

Android

iOS

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

Android

iOS

Associate this mediation group with one or more of your existing AdMob ad units. Then click Done.

Android

iOS

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

Android

iOS

Add Tapjoy as an ad source

In the Ad Sources card, select Add Ad Network.

Select Tapjoy (Open Bidding). Then, enter the SDK Key, as well as the Placement Name obtained in the previous section.

Android

iOS

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 passes back the reward specified in the Tapjoy dashboard when creating the placement.

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

Step 3: Import the Tapjoy SDK and adapter

Download the Google Mobile Ads mediation package for Tapjoy and extract the GoogleMobileAdsTapjoyMediation.unitypackage file from the archive.

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

Step 4: Additional code required

No additional code is required for Tapjoy integration.

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.

The Google Mobile Ads mediation plugin for Tapjoy version 1.1.1 includes the Tapjoy.SetUserConsent() and Tapjoy.SubjectToGDPR() methods. The following sample code shows how to pass consent information to the Tapjoy SDK. If you choose to call Tapjoy.SetUserConsent(), it is recommended that you do so prior to requesting ads via the Google Mobile Ads SDK.

using GoogleMobileAds.Api.Mediation.Tapjoy;
// ...

// 0 - User did not consent
// 1 - User does consent
Tapjoy.SetUserConsent("1");

There is also an optional flag that can be set to indicate if the user is subject to GDPR.

Tapjoy.SubjectToGDPR(true);

See Tapjoy’s Release Notes for more information.

Send feedback about...

Need help? Visit our support page.