This guide shows you how to use the Google Mobile Ads SDK to load and display ads from Tapjoy using mediation, covering both bidding and waterfall integrations. It covers how to add Tapjoy ads to an ad unit's mediation configuration, and how to integrate the Tapjoy SDK and adapter into an iOS app.
Supported integrations and ad formats
The Ad Manager mediation adapter for Tapjoy has the following capabilities:
Integration | |
---|---|
Bidding | |
Waterfall | |
Formats | |
Banner | |
Interstitial | |
Rewarded | |
Native |
Requirements
- iOS deployment target of 11.0 or higher
- [For bidding]: Tapjoy adapter 12.3.1.0 or higher (latest version recommended)
Latest Google Mobile Ads SDK
Complete the mediation Get started guide
Step 1: Set up configurations in Tapjoy UI
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 are then 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 Ad Manager mediation.

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 Ad Manager 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 is used to set up your Ad Manager Ad Unit for mediation in the next section. "Ad Manager 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.
The currency value and name are not forwarded by the Tapjoy adapter, so any generic values can be chosen for your currency name and amount.

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:
Bidding
Interstitial
Click the Create button for the Programmatic Interstitial Video content.



Rewarded
Click the Create button for Programmatic Rewarded Video content.



Waterfall
Interstitial
Click the Create button for the Interstitial Video content.



Rewarded
Click the Create button for Rewarded Video content.



Locate SDK Key
In addition to the Placement Name, you also need the SDK Key for setting up your Ad Manager ad unit.
Navigate to Settings > App Settings. Your SDK Key can be obtained from your App Info under the Application Platforms tab.
Locate reporting keys
Bidding
This step isn't required for bidding integrations.
Waterfall
You need your Publisher OAuth Key and your Mediation Key to proceed. Your Publisher OAuth Key can be obtained in the same page under the API Keys tab.
Your Mediation Key can be obtained in the same page under the Mediation Keys tab under the Reporting API Key column. The key is labeled "AdMob." Google Ad Manager publishers should still use this value despite the name mismatch.
Turn on test mode
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:
To get your device's advertising ID, add the following code in your app. Make sure to import AdSupport framework into your app before using the code below.
Swift
let advertisingId: String = ASIdentifierManager.shared().advertisingIdentifier.uuidString
print("Advertising ID: \(advertisingId)")
Objective-C
NSString *advertisingId = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
NSLog(@"Advertising ID: %@", advertisingId);
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.

Step 2: Set up Tapjoy demand in Ad Manager UI
Sign in to your Ad Manager account.
Add Tapjoy in Companies
Navigate to Admin > Companies, then click the New company button in the All companies tab. Select Ad network.
Bidding
Select Tapjoy as the Ad network and enter a unique Name. Then, click Save.
Waterfall
Select Tapjoy as the Ad network and enter a unique Name. Enable Mediation, turn on Automatic data collection, and enter the API Key obtained in the previous section. You don't need to enter a Username or Password. Click Save when done.
Enable secure signal sharing
Bidding
Navigate to Admin > Global settings. Go to the Ad Exchange account settings tab and review and toggle on Secure signal sharing. Click Save.
Navigate to Inventory > Secure signals, then toggle on the Status for Tapjoy. Click Save.
Waterfall
This step isn't required for waterfall integrations.
Configure Tapjoy bidding
Bidding
Navigate to Delivery > Bidders, and click New bidder under the Open Bidding tab.
Select Tapjoy as the bidder and the company you created for Tapjoy.
Toggle on Add this bidder's signal library to the list of allowed signals and Allow signals to be shared with this bidder. Then, click Continue.
Click Acknowledge.
Click Done.
To view the Open Bidding request status, navigate to Delivery > Bidders and look for the Approval status of the company you created for Tapjoy.
Waterfall
This step isn't required for waterfall integrations.
Configure ad unit mapping
Bidding
Navigate to Delivery > Bidders and select the company you created for Tapjoy in the Open Bidding tab. Go to the Ad unit mapping tab, then click New ad unit mapping.
Fill out the form and enter the SDK Key and Placement Name obtained in the previous section. Click Save.
Go to the Yield groups tab, then click New yield group.
Enter a unique Name for your yield group, set the Status to Active, select your Ad Format, and set the Inventory type to Mobile App. Under the Targeting > Inventory section, select your ad unit.
Scroll down and click Add yield partner.
In the form, select the company you created for Tapjoy as the Yield partner and Open Bidding as the Integration type. Update the Status to Active and click Save.
Waterfall
Navigate to Delivery > Yield groups and click the New yield group button.
Scroll down and click Add yield partner.
Select the Tapjoy yield partner created in the previous section. Choose Mobile SDK mediation as the Integration type, iOS as the Platform, and Active as the Status.
Enter the SDK Key and Placement Name obtained in the previous section, and the Default CPM value. Click Save.
Add Tapjoy to GDPR and US state regulations ad partners list
Follow the steps in GDPR settings and US state regulations settings to add Tapjoy to the GDPR and US state regulations ad partners list in the Ad Manager UI.
Step 3: Import the Tapjoy SDK and adapter
Using CocoaPods (recommended)
Add the following line to your project's Podfile:
pod 'GoogleMobileAdsMediationTapjoy'
From the command line run:
pod install --repo-update
Manual integration
Download the latest version of the Tapjoy SDK, and link Tapjoy.embeddedframework in your project.
Download the latest version of the Tapjoy adapter from the download link in the Changelog and link TapjoyAdapter.framework in your project.
Step 4: Implement privacy settings on Tapjoy SDK
EU consent and GDPR
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.
In Tapjoy SDK version 12.6.0, Tapjoy added a user consent API to support privacy settings. The following sample code shows how to pass this consent information to the Tapjoy SDK. If you choose to call this method, it is recommended that you do so prior to requesting ads through the Google Mobile Ads SDK.
Swift
import Tapjoy
...
let privacyPolicy = TJPrivacyPolicy()
privacyPolicy.setSubjectToGDPR(true)
privacyPolicy.setUserConsent("0")
Objective-C
#import <Tapjoy/Tapjoy.h>
...
TJPrivacyPolicy *privacyPolicy = [Tapjoy getPrivacyPolicy];
[privacyPolicy setSubjectToGDPR: YES];
[privacyPolicy setUserConsent: @"0"];
Visit Tapjoy's User Privacy guide for more details and the values that can be provided in each method.
US states privacy laws
U.S. states privacy laws 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 via a prominent "Do Not Sell My Personal Information" link on the "selling" party's homepage. The U.S. states privacy laws compliance guide offers the ability to enable restricted data processing 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.
In Tapjoy SDK version 12.6.0, Tapjoy added a user consent API to support privacy settings. The following sample code shows how to pass this consent information to the Tapjoy SDK. If you choose to call this method, it is recommended that you do so prior to requesting ads through the Google Mobile Ads SDK.
Swift
import Tapjoy
...
let privacyPolicy = TJPrivacyPolicy()
privacyPolicy.setUSPrivacy("1YYY")
Objective-C
#import <Tapjoy/Tapjoy.h>
...
TJPrivacyPolicy *privacyPolicy = [Tapjoy getPrivacyPolicy];
[privacyPolicy setUSPrivacy: @"1YYY"];
Visit Tapjoy's User Privacy guide for more details and the values that can be provided in each method.
Step 5: Add required code
SKAdNetwork integration
Follow Tapjoy's documentation 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 for Ad Manager and enable test mode in Tapjoy UI.
Verify test ads
To verify that you are receiving test ads from Tapjoy, enable single ad source testing in ad inspector using the Tapjoy (Bidding) and Tapjoy (Waterfall) ad source(s).
Optional steps
Add Tapjoy to CCPA ad partners list
Follow the steps in CCPA settings to add Tapjoy to the CCPA ad partners list in the Ad Manager UI.
Network-specific parameters
The Tapjoy adapter supports additional request parameter which can be passed
to the adapter using the GADMTapjoyExtras
class. This class includes the
following property:
debugEnabled
- Set this to
YES
to enable logging in Tapjoy SDK for debug mode.
Here's a code example of how to set this parameter at ad request:
Swift
let request = GAMRequest() let extras = GADMTapjoyExtras() extras.debugEnabled = true request.register(extras)
Objective-C
GAMRequest *request = [GAMRequest request]; GADMTapjoyExtras *extras = [[GADMTapjoyExtras alloc] init]; extras.debugEnabled = YES; [request registerAdNetworkExtras:extras];
Verify your adapter and SDK versions
To log the adapter and SDK versions, use the following code snippet:
Class<GADMediationAdapter> adapterClass = NSClassFromString(@"GADMediationAdapterTapjoy");
if (adapterClass != nil) {
GADVersionNumber adapterVersion = [adapterClass version];
GADVersionNumber sdkVersion = [adapterClass adSDKVersion];
NSLog(@"Adapter version: %ld.%ld.%ld.%ld",
adapterVersion.majorVersion,
adapterVersion.minorVersion,
adapterVersion.patchVersion / 100,
adapterVersion.patchVersion % 100);
NSLog(@"SDK version: %ld.%ld.%ld",
sdkVersion.majorVersion,
sdkVersion.minorVersion,
sdkVersion.patchVersion);
}
Logging the adapter version in Swift is not possible since the dynamic runtime feature does not exist in Swift, making it infeasible to dynamically create the class from the class name. If this is needed in Swift, you need to write it first in Objective-C, then import it using a bridging header.
Error codes
If the adapter fails to receive an ad from Tapjoy, you can check the underlying
error from the ad response using
GADResponseInfo.adNetworkInfoArray
under the following classes:
Format | Class name |
---|---|
Interstitial | GADMAdapterTapjoy |
Rewarded | GADMAdapterTapjoy |
Here are the codes and accompanying messages thrown by the Tapjoy adapter when an ad fails to load:
Error code | Reason |
---|---|
101 | Tapjoy server parameters configured in the Ad Manager UI are missing/invalid. |
102 | Tapjoy SDK failed to initialize. |
103 | The Tapjoy adapter does not support the ad format being requested. |
104 | Tapjoy sent a successful load callback but no content was available. |
105 | An ad is already loaded for this network configuration. |
106 | Tapjoy SDK returned a video failure error callback. |
Tapjoy iOS Mediation Adapter Changelog
Next Version
- Updated adapter to use new Tapjoy SDK APIs.
Version 13.2.1.0
- Verified compatibility with Tapjoy SDK 13.2.1.
Built and tested with:
- Google Mobile Ads SDK version 10.12.0.
- Tapjoy SDK version 13.2.1.
Version 13.1.2.0
- Verified compatibility with Tapjoy SDK 13.1.2.
Built and tested with:
- Google Mobile Ads SDK version 10.7.0.
- Tapjoy SDK version 13.1.2.
Version 13.1.1.0
- Verified compatibility with Tapjoy SDK 13.1.1.
Built and tested with:
- Google Mobile Ads SDK version 10.7.0.
- Tapjoy SDK version 13.1.1.
Version 13.1.0.0
- Verified compatibility with Tapjoy SDK 13.1.0.
Built and tested with:
- Google Mobile Ads SDK version 10.7.0.
- Tapjoy SDK version 13.1.0.
Version 13.0.1.0
- Verified compatibility with Tapjoy SDK 13.0.1.
- Removed support of the
armv7
architecture. - Now requires minimum iOS version 11.0.
- Now requires Google Mobile Ads SDK version 10.4.0 or higher.
Built and tested with:
- Google Mobile Ads SDK version 10.4.0.
- Tapjoy SDK version 13.0.1.
Version 12.11.1.0
- Verified compatibility with Tapjoy SDK 12.11.1.
- Removed support for forwarding callbacks to Google Mobile Ads SDK when Tapjoy ads are clicked.
- Now requires Google Mobile Ads SDK version 10.0.0 or higher.
Built and tested with:
- Google Mobile Ads SDK version 10.0.0.
- Tapjoy SDK version 12.11.1.
Version 12.11.0.0
- Updated the adapter to use the
didRewardUser
API. - Now requires Google Mobile Ads SDK version 9.8.0 or higher.
- Verified compatibility with Tapjoy SDK 12.11.0.
Built and tested with:
- Google Mobile Ads SDK version 9.11.0.
- Tapjoy SDK version 12.11.0.
Version 12.10.0.0
- Verified compatibility with Tapjoy SDK 12.10.0.
Built and tested with:
- Google Mobile Ads SDK version 9.4.0.
- Tapjoy SDK version 12.10.0.
Version 12.9.1.0
- Verified compatibility with Tapjoy SDK 12.9.1.
Built and tested with:
- Google Mobile Ads SDK version 9.1.0.
- Tapjoy SDK version 12.9.1.
Version 12.9.0.1
- Verified compatibility with Google Mobile Ads SDK version 9.0.0.
- Now requires Google Mobile Ads SDK version 9.0.0 or higher.
Built and tested with:
- Google Mobile Ads SDK version 9.0.0.
- Tapjoy SDK version 12.9.0.
Version 12.9.0.0
- Verified compatibility with Tapjoy SDK 12.9.0.
- Now requires minimum iOS version 10.0.
Build and tested with
- Google Mobile Ads SDK version 8.13.0.
- Tapjoy SDK version 12.9.0.
Version 12.8.1.0
- Verified compatibility with Tapjoy SDK 12.8.1.
Build and tested with
- Google Mobile Ads SDK version 8.5.0.
- Tapjoy SDK version 12.8.1.
Version 12.8.0.1
- Relaxed dependency to Google Mobile Ads SDK version 8.0.0 or higher.
Build and tested with
- Google Mobile Ads SDK version 8.4.0.
- Tapjoy SDK version 12.8.0.
Version 12.8.0.0
- Updated the adapter to use the
.xcframework
format. - Verified compatibility with Tapjoy SDK 12.8.0.
- Now requires Google Mobile Ads SDK version 8.2.0 or higher.
Build and tested with
- Google Mobile Ads SDK version 8.2.0.
- Tapjoy SDK version 12.8.0.
Version 12.7.1.0
- Verified compatibility with Tapjoy SDK 12.7.1.
- Now requires Google Mobile Ads SDK version 7.67.0 or higher.
Build and tested with
- Google Mobile Ads SDK version 7.67.0.
- Tapjoy SDK version 12.7.1.
Version 12.7.0.0
- Verified compatibility with Tapjoy SDK 12.7.0.
- Now requires Google Mobile Ads SDK version 7.65.0 or higher.
Build and tested with
- Google Mobile Ads SDK version 7.65.0.
- Tapjoy SDK version 12.7.0.
Version 12.6.1.0
- Verified compatibility with Tapjoy SDK 12.6.1.
Build and tested with
- Google Mobile Ads SDK version 7.61.0.
- Tapjoy SDK version 12.6.1.
Version 12.6.0.0
- Verified compatibility with Tapjoy SDK 12.6.0.
- Now requires Google Mobile Ads SDK version 7.61.0 or higher.
Build and tested with
- Google Mobile Ads SDK version 7.61.0.
- Tapjoy SDK version 12.6.0.
Version 12.4.2.2
- Updated the adapter to be more consistent in forwarding ad event callbacks:
- Interstitial and rewarded ads now record clicks.
- Interstitial ads now forward
interstitialWillLeaveApplication:
when clicked. - Rewarded ads now forward
willDismissFullScreenView:
when dismissed.
- Added standardized adapter error codes and messages.
- Now requires Google Mobile Ads SDK version 7.60.0 or higher.
Build and tested with
- Google Mobile Ads SDK version 7.60.0.
- Tapjoy SDK version 12.4.2.
Version 12.4.2.1
- Adapter now fails if the request to Tapjoy returns without any available content.
- Removed support for the i386 architecture.
Build and tested with
- Google Mobile Ads SDK version 7.57.0.
- Tapjoy SDK version 12.4.2.
Version 12.4.2.0
- Verified compatibility with Tapjoy SDK 12.4.2.
- Now requires minimum iOS version 9.0.
Build and tested with
- Google Mobile Ads SDK version 7.55.0.
- Tapjoy SDK version 12.4.2.
Version 12.4.1.0
- Verified compatibility with Tapjoy SDK 12.4.1.
Build and tested with
- Google Mobile Ads SDK version 7.53.1.
- Tapjoy SDK version 12.4.1.
Version 12.4.0.0
- Verified compatibility with Tapjoy SDK 12.4.0.
Build and tested with
- Google Mobile Ads SDK version 7.53.1.
- Tapjoy SDK version 12.4.0.
Version 12.3.4.0
- Verified compatibility with Tapjoy SDK 12.3.4.
Build and tested with
- Google Mobile Ads SDK version 7.52.0.
- Tapjoy SDK version 12.3.4.
Version 12.3.3.0
- Verified compatibility with Tapjoy SDK 12.3.3.
Version 12.3.2.0
- Verified compatibility with Tapjoy SDK 12.3.2.
Version 12.3.1.0
- Verified compatibility with Tapjoy SDK 12.3.1.
- Added bidding capability to the adapter for interstitial and rewarded ads.
Version 12.2.1.0
- Verified compatibility with Tapjoy SDK 12.2.1.
- Updated the adapter to use the new rewarded API.
- Now requires Google Mobile Ads SDK version 7.42.2 or higher.
Version 12.2.0.0
- Verified compatibility with Tapjoy SDK 12.2.0.
Version 12.1.0.0
- Verified compatibility with Tapjoy SDK 12.1.0.
Version 12.0.0.0
- Verified compatibility with Tapjoy SDK 12.0.0.
- Added
adapterDidCompletePlayingRewardBasedVideoAd:
callback to the adapter.
Version 11.12.2.0
- Verified compatibility with Tapjoy SDK 11.12.2.
Version 11.12.1.0
- Verified compatibility with Tapjoy SDK 11.12.1.
Version 11.12.0.0
- Verified compatibility with Tapjoy SDK 11.12.0.
Version 11.11.1.0
- Verified compatibility with Tapjoy SDK 11.11.1.
Version 11.11.0.0
- Verified compatibility with Tapjoy SDK 11.11.0.
Version 11.10.2.0
- Updated the default reward amount to 1.
- Removed the support for
armv7s
architecture. - Verified compatibility with Tapjoy SDK 11.10.2.
Version 11.10.1.0
- Verified compatibility with Tapjoy SDK 11.10.1.
Version 11.10.0.0
- Verified compatibility with Tapjoy SDK 11.10.0.
Version 11.9.1.0
- Initial release. Supports reward-based video ads and interstitial ads.