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 to an ad unit's mediation configuration, and how to integrate the Tapjoy SDK and adapter into a Unity app.
Supported integrations and ad formats
The AdMob mediation adapter for Tapjoy has the following capabilities:
Integration | |
---|---|
Bidding | |
Waterfall | |
Formats | |
Banner | |
Interstitial | |
Rewarded |
Requirements
- Unity 4 or higher
- Latest Google Mobile Ads SDK
- [For bidding]: Google Mobile Ads mediation plugin for Tapjoy 2.3.0 or higher (latest version recommended)
- To deploy on Android
- Android API level 19 or higher
- To deploy on iOS
- iOS deployment target of 12.0 or higher
- A working Unity project configured with Google Mobile Ads SDK. See Get Started for details.
- Complete the mediation Get started guide
Step 1: Set up configurations in Tapjoy UI
Regístrate o accede a tu panel de Tapjoy.
Agregar app
Para agregar tu app al panel de Tapjoy, ve a la lista de apps en la parte superior derecha y haz clic en el botón Agregar app. Luego, se te solicitará que ingreses los detalles de tu app.
Completa el formulario y haz clic en el botón Crear ahora para agregar tu app al panel de Tapjoy.
Puedes omitir los pasos de integración presentados por Tapjoy y continuar con la creación de posiciones para usar con la AdMob mediación.
Si tu app admite ambas plataformas, elige Both como la plataforma.
Android
iOS
Posición, moneda virtual y contenido
Posición
Ve a Monetización > Posiciones y haz clic en el botón Crear posición en la esquina superior derecha. Incluso si ya tienes una posición, es mejor crear una nueva para AdMob , de modo que se pueda realizar un seguimiento de esta y generar informes sobre ella por separado.
Ingresa un Nombre para tu posición, marca la casilla de verificación Mediación y selecciona AdMob en la lista desplegable. Cuando termines, haz clic en Create (Crear).
El Nombre de la posición que ingresas aquí se usa a fin de configurar tuAdMob Unidad de anuncios para la mediación en la siguiente sección. En este ejemplo, se utilizó "AdMob Mediación", pero puedes asignar el nombre que desees a tu posición.
Moneda virtual
Navega a Monetización > Moneda virtual y haz clic en el botón Crear moneda virtual en la esquina superior derecha.
Completa el formulario y haz clic en Crear ahora. Usa NO_CALLBACK como URL de devolución de llamada. De esta manera, se garantiza que el SDK de Tapjoy evite una llamada innecesaria a tu servidor.
El adaptador de Tapjoy no reenvía el valor ni el nombre de la moneda, por lo que puedes elegir cualquier valor genérico para el nombre y el importe de tu moneda.
Android
iOS
Contenido
Navega a Monetización > Crear contenido para crear contenido que se mostrará con las posiciones.
Para obtener más instrucciones sobre cómo crear contenido, selecciona la pestaña correspondiente a tu formato de anuncio preferido:
Ofertas
Intersticial
Haz clic en el botón Crear para el contenido de Video intersticial programático. Proporciona un Nombre para el contenido y elige tu Plataforma. * {Android} * {iOS} Selecciona la moneda virtual creada anteriormente como Virtual Currency. Selecciona la posición de anuncio intersticial que creaste anteriormente. Cuando termines de crear el contenido, haz clic en el botón Guardar en la parte inferior.Recompensado
Haz clic en el botón Crear en el contenido de Video recompensado programático. * {Android} * {iOS} Selecciona la moneda virtual que creaste antes como Virtual Currency. Selecciona la posición de recompensa creada anteriormente. Cuando termines de crear el contenido, haz clic en el botón Save que se encuentra en la parte inferior.Cascada
Intersticial
Haz clic en el botón Crear para el contenido de Video intersticial. Proporciona un Nombre para el contenido y elige tu Plataforma. * {Android} * {iOS} Selecciona la moneda virtual creada anteriormente como Virtual Currency. Selecciona la posición de anuncio intersticial que creaste anteriormente. Cuando termines de crear el contenido, haz clic en el botón Guardar en la parte inferior.Recompensado
Haz clic en el botón Crear para el contenido de Video recompensado. Proporciona un Nombre para el contenido y elige tu Plataforma. * {Android} * {iOS} Selecciona la moneda virtual creada anteriormente como Virtual Currency. Selecciona la posición de recompensa creada anteriormente. Cuando termines de crear el contenido, haz clic en el botón Save que se encuentra en la parte inferior.Ubica la clave del SDK
Además del nombre de la posición, también necesitas la clave del SDK para configurar tu AdMob unidad de anuncios.
Ve a Configuración > Configuración de la app. Puedes obtener la clave del SDK en la Información de tu app, en la pestaña Plataformas de aplicaciones.
Android
iOS
Ubica las claves de informes
Ofertas
Este paso no es obligatorio para las integraciones de ofertas.
Cascada
Necesitas tu clave OAuth de publicador y tu clave de mediación para continuar. Puedes obtener tu clave OAuth de publicador en la misma página, en la pestaña Claves de API.
Puedes obtener tu clave de mediación en la misma página, en la pestaña Claves de mediación de la columna Clave de API de informes. La clave está etiquetada como “AdMob”.
Activar el modo de prueba
Los anuncios de prueba se pueden habilitar en el panel de Tapjoy, en Configuración > Configuración de la app > Dispositivos de prueba. Crea un dispositivo de prueba nuevo con el ID de publicidad del dispositivo:
Android
Para encontrar el ID de publicidad de tu dispositivo, ve a Google > Anuncios en la Configuración de tu dispositivo.
iOS
Para obtener el ID de publicidad del dispositivo, agrega el siguiente código a tu app. Asegúrate de importar el framework de AdSupport a la app antes de usar el código que aparece a continuación.
Swift
let advertisingId: String = ASIdentifierManager.shared().advertisingIdentifier.uuidString
print("Advertising ID: \(advertisingId)")
Objective‑C
NSString *advertisingId = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
NSLog(@"Advertising ID: %@", advertisingId);
A continuación, modifica el contenido que creaste anteriormente.
Para modificar tu contenido, primero navega a Monetización > Posiciones y haz clic en la pestaña User Initiated. Luego, selecciona el menú desplegable para el contenido que deseas editar y elige Editar.
En la sección Básico del contenido, marca la casilla de verificación Solo para dispositivos de prueba. Luego, haz clic en Guardar en la parte inferior de la página. Listo. Ahora tienes una integración de mediación activa con Tapjoy.
Android
iOS
Step 2: Set up Tapjoy demand in AdMob UI
Cómo configurar la mediación para tu unidad de anuncios
Android
Para obtener instrucciones, consulta el paso 2 de la guía para Android.
iOS
Si quieres obtener instrucciones, consulta el paso 2 de la guía para iOS.
Add Tapjoy to GDPR and US state regulations ad partners list
Sigue los pasos que se indican en Configuración del GDPR y Configuración de las reglamentaciones estatales de EE.UU. para agregar Tapjoy a la lista de socios publicitarios de las reglamentaciones estatales de EE.UU. y el GDPR en la AdMob IU.
Step 3: Import the Tapjoy SDK and adapter
Download the latest version of Google Mobile Ads mediation plugin for Tapjoy
from the download link in the
Changelog and extract
GoogleMobileAdsTapjoyMediation.unitypackage
from the zip file.
In your Unity project editor, select Assets > Import Package > Custom
Package and select the GoogleMobileAdsTapjoyMediation.unitypackage
file you
downloaded. Make sure that all the files are selected and click Import.
Then, select Assets > Play Services Resolver > Android Resolver > Force
Resolve. The Unity Play Services Resolver library will perform dependency
resolution from scratch and copy the declared dependencies into the
Assets/Plugins/Android
directory of your Unity app.
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.
The Google Mobile Ads mediation plugin for Tapjoy version 1.1.1 includes the
SetUserConsent()
and SubjectToGDPR()
methods. The following sample code
shows how to pass 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.
using GoogleMobileAds.Api.Mediation.Tapjoy;
// ...
Tapjoy.SetUserConsent("myUserConsent");
Additionally, there is an optional flag that can be set to indicate whether the user is subject to GDPR.
Tapjoy.SubjectToGDPR(true);
See Tapjoy's User Privacy guide for more details and the values that can be provided in the 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.
The Google Mobile Ads mediation plugin for Tapjoy version 2.9.1 includes the
SetUSPrivacy()
method. The following sample code shows how to pass 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.
using GoogleMobileAds.Api.Mediation.Tapjoy;
// ...
Tapjoy.SetUSPrivacy("myUSPrivacyString");
See Tapjoy's User Privacy guide for more details and the values that can be provided in the method.
Step 5: Add required code:
Android
No additional code is required for Tapjoy integration.
iOS
SKAdNetwork integration
Follow Tapjoy's documentation to add
the SKAdNetwork identifiers to your project's Info.plist
file.
Step 6: Test your implementation
Habilitar anuncios de prueba
Asegúrate de registrar tu dispositivo de prueba en AdMob y habilitar el modo de prueba en la Tapjoy IU.
Cómo verificar los anuncios de prueba
Para verificar que recibes anuncios de prueba deTapjoy, habilita las pruebas de fuentes de anuncios individuales en el inspector de anuncios mediante la Tapjoy (Bidding) and Tapjoy (Waterfall) fuente de anuncios.
Optional steps
Android
Permissions
For optimal performance, Tapjoy recommends adding the following
optional permissions
to your app's AndroidManifest.xml
file. Modify the AndroidManifest.xml
file located under the
Assets/Plugins/Android/GoogleMobileAdsTapjoyMediation
folder and include
these optional permissions:
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
iOS
No additional steps for iOS integration.
Error codes
If the adapter fails to receive an ad from Tapjoy, publishers can check the
underlying error from the ad response using
ResponseInfo
under the
following classes:
Android
Format | Class name |
---|---|
Interstitial | TapjoyAdapter |
Rewarded | TapjoyMediationAdapter |
iOS
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:
Android
Error code | Reason |
---|---|
101 | Tapjoy server parameters configured in the AdMob UI are missing/invalid. |
103 | The publisher must request ads with an Activity context. |
104 | Tapjoy SDK failed to initialize. |
105 | A Tapjoy presentation error occurred during video playback. |
106 | Tapjoy SDK can't load two ads for the same placement ID at once. |
107 | App did not request for native ads. |
108 | Tapjoy SDK has no ad content available. |
iOS
Error code | Reason |
---|---|
101 | Tapjoy server parameters configured in the AdMob 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 Unity Mediation Plugin Changelog
Version 3.2.0
- Supports Tapjoy Android adapter version 13.2.1.0.
- Supports Tapjoy iOS adapter version 13.2.1.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 8.6.0.
Version 3.1.1
- Supports Tapjoy Android adapter version 13.1.2.0.
- Supports Tapjoy iOS adapter version 13.1.2.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 8.4.1.
Version 3.1.0
- Supports Tapjoy Android adapter version 13.1.1.0.
- Supports Tapjoy iOS adapter version 13.1.1.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 8.4.0.
Version 3.0.0
- Moved adapter content to
GoogleMobileAds/Mediation/Tapjoy/
. - Refactored adapter namespace to use
GoogleMobileAds.Mediation.Tapjoy
. - Supports Tapjoy Android adapter version 13.0.1.0.
- Supports Tapjoy iOS adapter version 13.0.1.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 8.1.0.
Version 2.10.1
- Supports Tapjoy Android adapter version 12.11.1.0.
- Supports Tapjoy iOS adapter version 12.11.1.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 7.4.1.
Version 2.10.0
- Supports Tapjoy Android adapter version 12.11.0.0.
- Supports Tapjoy iOS adapter version 12.11.0.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 7.3.0.
Version 2.9.1
- Added the
Tapjoy.SetUSPrivacy(string)
method. - Supports Tapjoy Android adapter version 12.10.0.1.
- Supports Tapjoy iOS adapter version 12.10.0.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 7.2.0.
Version 2.9.0
- Supports Tapjoy Android adapter version 12.10.0.1.
- Supports Tapjoy iOS adapter version 12.10.0.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 7.0.2.
Version 2.8.2
- Supports Tapjoy Android adapter version 12.9.1.0.
- Supports Tapjoy iOS adapter version 12.9.1.0.
- Built and tested with the Google Mobile Ads Unity Plugin version 7.0.0.
Version 2.8.1
- Supports Tapjoy Android adapter version 12.9.0.0.
- Supports Tapjoy iOS adapter version 12.9.0.1.
- Built and tested with the Google Mobile Ads Unity Plugin version 7.0.0.
Version 2.8.0
- Supports Tapjoy Android adapter version 12.9.0.0.
- Supports Tapjoy iOS adapter version 12.9.0.0.
Version 2.7.1
- Supports Tapjoy Android adapter version 12.8.1.0.
- Supports Tapjoy iOS adapter version 12.8.1.0.
Version 2.7.0
- Supports Tapjoy Android adapter version 12.8.0.1.
- Supports Tapjoy iOS adapter version 12.8.0.1.
Version 2.6.1
- Supports Tapjoy Android adapter version 12.7.1.0.
- Supports Tapjoy iOS adapter version 12.7.1.0.
Version 2.6.0
- Supports Tapjoy Android adapter version 12.7.0.0.
- Supports Tapjoy iOS adapter version 12.7.0.0.
Version 2.5.1
- Supports Tapjoy Android adapter version 12.6.1.0.
- Supports Tapjoy iOS adapter version 12.6.1.0.
Version 2.5.0
- Supports Tapjoy Android adapter version 12.6.0.0.
- Supports Tapjoy iOS adapter version 12.6.0.0.
Version 2.4.2
- Supports Tapjoy Android adapter version 12.4.2.1.
- Supports Tapjoy iOS adapter version 12.4.2.1.
Version 2.4.1
- Supports Tapjoy Android adapter version 12.4.2.0.
- Supports Tapjoy iOS adapter version 12.4.2.0.
Version 2.4.0
- Supports Tapjoy Android adapter version 12.4.1.0.
- Supports Tapjoy iOS adapter version 12.4.1.0.
Version 2.3.1
- Supports Tapjoy Android adapter version 12.3.3.0.
- Supports Tapjoy iOS adapter version 12.3.3.0.
Version 2.3.0
- Supports Tapjoy Android adapter version 12.3.1.0.
- Supports Tapjoy iOS adapter version 12.3.1.0.
Version 2.2.0
- Updated the plugin to support the new Rewarded API.
- Supports Tapjoy Android adapter version 12.2.1.0.
- Supports Tapjoy iOS adapter version 12.2.1.0.
Version 2.1.0
- Supports Tapjoy Android adapter version 12.2.0.0.
- Supports Tapjoy iOS adapter version 12.1.0.0.
Version 2.0.1
- Supports Tapjoy Android adapter version 12.0.0.1.
- Supports Tapjoy iOS adapter version 12.0.0.0.
Version 2.0.0
- Supports Tapjoy Android adapter version 12.0.0.0.
- Supports Tapjoy iOS adapter version 12.0.0.0.
Version 1.1.1
- Supports Tapjoy Android SDK version 11.12.2.
- Supports Tapjoy iOS SDK version 11.12.2.
- Added
Tapjoy.SetUserConsent()
method to forward the user's consent status to the Tapjoy SDK in the form of a consent string. - Added
Tapjoy.SubjectToGDPR()
method to indicate if GDPR is applicable to the user or not.
Version 1.1.0
- Supports Tapjoy Android SDK version 11.12.1.
- Supports Tapjoy iOS SDK version 11.12.1.
Version 1.0.0
- First release!
- Supports Tapjoy Android SDK version 11.11.1.
- Supports Tapjoy iOS SDK version 11.11.1.