Table of Contents
- 1 Summary
- 2 Setup Instructions
- 3 Multiple Tapjoy instances in MoPub mediation
- 4 Tapjoy Rewards in MoPub
- 5 Sample code
Note: This document is currently under construction to reflect MoPub’s recent dashboard changes and Tapjoy’s inclusion as a fully supported MoPub SDK Network (March 8, 2018).
This guide will cover how to integrate Tapjoy as an ad network through MoPub mediation for running rewarded videos, using Tapjoy 11.x (current and recommended).
Overview of Mopub Adapter mediation
In this configuration, your application talks to the Mopub SDK, which in turn requests content from the Tapjoy SDK. Reward information is passed directly from Tapjoy’s SDK to your application, or from Tapjoy’s server to your server (see the section on Rewards below). Here is a diagram showing the flow of information in a Tapjoy -Mopub adapter mediation:
Using Tapjoy Functionality with Mopub-Tapjoy Adapter Integration
Many publishers wish to use Tapjoy functionality (OfferWall, IAP Promotion, Analytics, etc.) along with using Tapjoy as an ad provider for a Mopub Adapter Mediation. Since part of the Mopub Adapter Mediation includes an integration of the Tapjoy SDK, all Tapjoy functionality is available to your application without any additional integration steps.
- Tapjoy SDK 11.0.3 or above: Download
- MoPub SDK (this adapter was tested with MoPub 4.0): Download
- Tapjoy Custom Event code: iOS, Android, Unity
Before You Start, Make Sure:
- Your app is registered in your MoPub account and has the MoPub SDK integrated.
- Your app has configured the Rewarded Video (Tapjoy calls this "Video") or Fullscreen (Tapjoy calls this "Interstial") ad unit on MoPub’s dashboard.
- You have read through MoPub Getting Started guides for Android and iOS, or Unity.
- You have a Tapjoy dashboard account and SDK key for the app you want to use MoPub mediation with.
- You have set up a placement on the Tapjoy dashboard and connected a "Video" or "Interstitial" content card to that placement. Please see the links below for more details:
Integrating Tapjoy into your iOS, Android, or Unity App
- Follow the instructions to integrate the Tapjoy embedded framework and make the connect call to initialize Tapjoy. Make sure to call ‘connect’ to start the Tapjoy SDK.: http://dev.tapjoy.com/ sdk-integration/ios/getting-started-guide-publishers-ios/
- Integrate the pre-built Tapjoy-MoPub Rewarded Video adapter for iOS (available on MoPub GitHub)
- Follow the instructions to integrate the Tapjoy jar and make the connect call to initialize Tapjoy: http://dev.tapjoy.com/sdk-integration/android/getting-started-guide-publishers-android/
- Integrate the pre-built Tapjoy-MoPub Rewarded Video adapter for Android (available on MoPub GitHub)
- Integrate the Tapjoy SDK: dev.tapjoy.com/sdk-integration/unity/getting-started-guide-publishers-unity/
- Integrate the MoPub Unity SDK: https://github.com/mopub/mopub-unity-sdk/
- Integrate the Tapjoy-MoPub Rewarded Video Adapters. We have a unitypackage that contains the adapter files here for your convenience. You can download the unitypackage for the adapter files here.
Tapjoy Network Setup in MoPub
Follow the instructions here explain how to add a Custom Native Network to your Mopub setup. You must do this for Tapjoy. For your convenience, we have included instructions specific for Tapjoy here:
- In the Mopub Dashboard, go to the Networks tab, and click "New Network”:
- Scroll down to Tapjoy and click it:
- Click the "Enable reporting access" switch so that it is "Enabled":[NOTE: As of March 23, 2018, there is a bug in the MoPub dashboard that prevents it from recognizing the MoPub Mediation Key until the Tapjoy SDK Key has been entered. As a workaround for this bug, leave "Enable reporting access" off and skip steps 3 through 6 until after you have added your Tapjoy SDK Key (steps 8, 10, and 11 below). Then, go back and complete steps 3 through 6.]
- Scroll down to the "MoPub Mediation Key". This is a value from the Tapjoy dashboard. To find it, go to your application in the Tapjoy dashboard. Go to "Settings" in the top menu bar, click it, and select "App Settings":
- Scroll down until you can see the "Mediation Keys" tab. Click it. Click the "copy" icon next to the MoPub Mediation Reporting API Key:
Similarly, switch to "API Keys" tab and click the "copy" icon next to the Publisher OAuth Key:
- Paste these copied values from Step-5 into the "MoPub Mediation Key" and "Publisher OAuth key" fields in the MoPub dashboard:
- In most cases, you will leave the "Geo targeting" and "Keyword targeting" fields blank. Click the "Next" button on the lower-right. Click the "Next" button again to move to "App & ad unit setup".
- Find your Tapjoy SDK Key and Tapjoy Placement Names. To find your Tapjoy SDK Key, go to your app in the Tapjoy dashboard, go to "Settings" in the top menu, click it, select "App Settings", scroll down to the iOS or Android SDK Key and click the "copy" icon next to it:
- To find your Tapjoy placement name, click "Monetization" in the top menu, then click "Placements", and find the placement you are using for Mopub mediated content.
- Now paste these values into the appropriate boxes on the MoPub dashboard:
- Click "Save & Close"
- In the Mopub Dashboard, go to the Networks tab, and click "New Network”:
You’re finished! Be sure to test your Mobpub – Tapjoy mediation implementation to be sure everything is functioning correctly before you release your application to the app store.
Multiple Tapjoy instances in MoPub mediation
Sometimes, a publisher will want to set up more than one instance of Tapjoy in a single MoPub mediation waterfall. Usually this is so you can have Tapjoy instances with different eCPM targets. For example, you might have one Tapjoy rewarded video instance with high eCPM target, one with a mid-level eCPM target, and one with a low eCPM target. This can lead to a substantial increase in revenue over having a single instance, because you will be able to capture high-value Tapjoy ads at the top of the waterfall, without losing access to a "backfill" of lower-value ads further down in the waterfall. Typically, a publisher will set up two or three such instances.
Note that in order to set eCPM target, you have to speak to your Tapjoy Account Manager. It is not something you can do yourself from the Tapjoy dashboard.
Setting up multiple Tapjoy instances in MoPub
To set up multiple Tapjoy instances on Mobpub, use the Line Item feature in the MoPub dashboard. Be sure to add Tapjoy as a Network (see instructions above) first. When creating a Line Item, the type should be set to Network.
Tapjoy Rewards in MoPub
Tapjoy provides the ability for Publishers to manage currency rewards depending on how/where the currency balance is maintained:
- Self-Managed Currency: Publishers that are managing the currency balances on their own will need to provide a post-back URL to Tapjoy. The post-back URL will receive the reward amount upon successful completions of ad actions (i.e. watching a video): http://dev.tapjoy.com/virtual-currency/non-managed-currency/
- Tapjoy Managed Currency: Tapjoy has a free service that publishers can use to hold the user stored value accounts for their virtual currencies. The service provides a ledger for holding the currencies earned (or purchased) by the users. For publishers that are using this service, Tapjoy manages and updates the currency rewards based on the completion of ad actions. More details on how to use the service and how to update balances can be found here: http://dev.tapjoy.com/virtual-currency/managed-currency/
Please note that in the current implementation, Tapjoy does not pass the reward amount to the MoPub framework, this means publishers will not get the reward amount in the reward callback as provided by the MoPub framework.
This sample code shows how to interface between MoPub’s rewarded video callbacks and Tapjoy’s Virtual Currency system ( for ‘managed currency’ only):