Update Guide

This guide describes steps required when updating from one Tapdaq Plugin version to another, its recommended you perform all the steps to prevent any issues or conflicts.

Upgrading between any version

The following guide explains how to upgrade Tapdaq's Unity SDK between each version.

1. Uninstall the previous version

This will remove all of Tapdaq, adapters and SDK dependencies, there is an option to keep your settings, so you will not have to re-enter your appid or client key.

Window>Tapdaq>Uninstall

Window>Tapdaq>Uninstall Options

2. Import all Unity Packages

  • Download & import the latest Tapdaq-UnityPlugin.unitypackage of our plugin from Quickstart

Upgrading Specific Versions

This section notes any changes that need to be made when upgrading to specific version.

7.6.0

Init changes

To simplify settings such as GDPR, the init method accepting those parameters is now deprecated and new setters/getters detailed further below have been added, all settings can now be set/changed at any time before/after initialisation.

Modified implementation

This method will no longer use default status values like TDSTATUS.UNKNOWN, it will now get values that have previously been set, only using UNKNOWN if none set.

public class AdManager {
	public static void Init();
}

Deprecated

public class AdManager {
	public static void Init (TDStatus isUserSubjectToGDPR = TDStatus.UNKNOWN, TDStatus isConsentGiven = TDStatus.UNKNOWN, TDStatus isAgeRestrictedUser = TDStatus.UNKNOWN, string userId = null, bool shouldForwardUserId = false);
}

US Privacy/CCPA

UserSubjectToUSPrivacy states whether a user is in a US state that has privacy laws to inhibit the sale of user data. US Privacy status states whether to enforce privacy, for many networks setting this to TRUE will forward a "true" flag for doNotSell CCPA flags.

As of this version AdMob, IronSource & Mintegral receive these flags.

AdManager.SetUserSubjectToUSPrivacyStatus(TDStatus.TRUE);
AdManager.SetUSPrivacyStatus(TDStatus.TRUE);

GDPR Interface Changes

GDPR interfaces have been updated to all use the STATUS values for setters/getters to make it clearer and updating the values more flexible.

Added

AdManager.SetUserSubjectToGdprStatus()
AdManager.GetUserSubjectToGdprStatus()
AdManager.SetConsentStatus()
AdManager.GetConsentStatus()
AdManager.SetAgeRestrictedUserStatus()
AdManager.GetAgeRestrictedUserStatus()

Deprecated


AdManager.SetUserSubjectToGDPR()
AdManager.IsUserSubjectToGDPR()
AdManager.SetConsentGiven()
AdManager.IsConsentGiven()
AdManager.SetIsAgeRestrictedUser()
AdManager.IsAgeRestrictedUser()

Mute Flag

For networks which support an SDK level mute flag for ads, this flag will be used for them.

AdManager.SetMuted(true);
AdManager.IsMuted()

As of this version AdMob, AppLovin, Mintegral & Vungle use this flag

7.5.0

Banners

A number of changes to banners have been implemented in this version.

  • Banners will no longer refresh when not visible or the app is closed
  • Banners will continue to refresh after failing to refresh, they will now try again at the refresh interval (30 seconds)
  • New AdRefresh & AdFailToRefresh callbacks have been added
  • Placement tags are now accepted
  • AdMob Standard/Smart banners now use AdMob adaptive banners

Placement tags

It's now possible to pass in placement tags as a load/show/hide/destroy parameter, this will only use networks which have the placement tag enabled. Placement tags are optional paramters, if not provided default will be used.

AdManager.RequestBanner(TDMBannerSize.TDMBannerStandard, "<INSERT_PLACEMENT_TAG>"); // Load banner with type
AdManager.RequestBanner(320, 100, "<INSERT_PLACEMENT_TAG>"); // Load banner with custom size

AdManager.ShowBanner(TDBannerPosition.Bottom, "<INSERT_PLACEMENT_TAG>"); // Show banner at fixed position
AdManager.ShowBanner(10,200, "<INSERT_PLACEMENT_TAG>"); // Show banner at custom position

AdManager.HideBanner("<INSERT_PLACEMENT_TAG>"); // Hide banner
AdManager.DestroyBanner("<INSERT_PLACEMENT_TAG>"); // Destroy banner

Custom size

A new Load method has been added with width/height parameters, this allows the banner type to be selected on a best fit given the networks available. E.g. if the view is 400x60 a Standard or Smart banner will be used depending on which network is used.

Custom Position

A new Show method has been added with x/y parameters which allow the banner to be shown anywhere on the screen.

Callback added - AdRefresh & AdFailToRefresh

TMAdListenerBase now has a AdFailToRefresh method, this will be called if the banner cannot load a new ad after it has succeeded the first time, AdRefresh will be called if it was successful. An error will be provided with details of the failure like AdNotAvailable callback does.

AdAvailable will still be called when a banner loads for the first time, the refresh callbacks will be called on each refresh interval after.

private void OnEnable () {
	TDCallbacks.AdRefresh += OnAdRefresh;
	TDCallbacks.AdFailToRefresh += OnAdFailToRefresh;
}

private void OnDisable () {
	TDCallbacks.AdRefresh -= OnAdRefresh;
	TDCallbacks.AdFailToRefresh -= OnAdFailToRefresh;
}

private void OnAdRefresh(TDAdEvent e)
{

}

private void OnAdFailToRefresh(TDAdEvent e)
{

}

Ad Unit strings changed

TDAdEvent.adType values have changed as follows:

  • Static interstitial changed from INTERSTITIAL to static_interstitial
  • Video interstitial changed from VIDEO to video_interstitial
  • Rewarded video interstitial changed from REWARD_AD to rewarded_video_interstitial
  • Banner changed from BANNER to banner

TDAdEvent.adType remains available to use however it's recommended to use these methods instead to identify ad type:

TDAdEvent e;
if (e.IsInterstitialEvent()) {

} else if (e.IsVideoEvent()) {

} else if (e.IsRewardedVideoEvent()) {

} else if (e.IsBannerEvent()) {

}

7.4.0

Quickstart integration changes to Cocoapods/Maven

The Quickstart page no longer requires individual network adapters to be downloaded, instead there is just one small Tapdaq-UnityPlugin.unitypackage containing unity code. A new section in the TapdaqSettings panel is available, enabling cocoapods/maven will display all the available networks for Android/iOS, simply enable the ones required and select save, these will then be added to your project.

Both platforms rely on the Play Services Resolver. For Android there are some recommended settings details in the Quickstart page.

Removed Ad Networks

  • HyprMX

AdMob Android now requires AppId

The plugin now uses AdMob SDK 18.2.0 which requires the AdMob appId to be inserted into the AndroidManifest.xml. This can be done settings in the Tapdaq settings panel in Unity. This will then be automatically added to your AndroidManifest.xml when you build.

YouAppi GDPR Settings

For all users, Tapdaq's GDPR settings must be set to something other than unknown before initialising for YouAppi to function. For users outside of the EU UserSubjectToGdpr should be set to false For users inside of the EU UserSubjectToGdpr should be set to true, also Consent should be provided for YouAppi to intialise. Note the consent MUST be obtained from the user. If any other settings are provided, YouAppi will not be initialised and will not display ads. See User Privacy page for details on how to set GDPR settings

7.3.0

Added Ad Networks

The following networks support both Video & Rewarded Video content.

  • Maio
  • Mintegral
  • TikTok (iOS only)

Removed Ad Networks

  • Kiip
  • MoPub
  • Receptiv

7.2.0

Deprecated AdManager.InitWithConsent

InitWithConsent has been deprecated in favor of Init method with optional parameters.

public static void InitWithConsent(TDStatus isUserSubjectToGDPR, TDStatus isConsentGiven, TDStatus isAgeRestrictedUser)
public static void Init (TDStatus isUserSubjectToGDPR = TDStatus.UNKNOWN, TDStatus isConsentGiven = TDStatus.UNKNOWN, TDStatus isAgeRestrictedUser = TDStatus.UNKNOWN, string userId = null, bool shouldForwardUserId = false)

User Id

A UserId field has been added to the TapdaqConfig & Tapdaq interface, this replaces the hashed_user_id that was passed into showRewardedVideo method, which is now deprecated. If UserId is not set, the hashed_user_id will continue to be used (if available).

AdMob iOS now requires AppId

The plugin now uses AdMob SDK 7.44.0 which requires the AdMob appId to be inserted into the info.plist. This can be done settings it in the Tapdaq settings panel in Unity. This will then be automatically added to your info.plist when you build.

7.1.0

Ironsource Instance ID's

The Ironsource Adapter has changed its implementation to use Instance IDs rather than Placements, both are available on the Ironsource dashboard and should be replaced in the Tapdaq dashboard.

Replacing ID's will cause previous SDK's to fail to load ads, vice versa leaving placements in the dashboard will cause new SDK's to fail to load.

Ironsource Offerwall Support Removed

Offerwalls will now fail to load as the Ironsource Offerwall implementation has been removed. The load/Show interface remains but will be removed in later versions.

7.0.0

NEW: SDK version 7.0.0 supports zones. Please note, this release does not currently support cross promotion ad serving. To access our cross promotion features, please use SDK version 6.4.1

Placement Tags

Placement tags are no longer need to be registered, they have been removed from the Tapdaq settings panel. They are however still used for loading and showing ads.

Added DidFailToDisplay Callbacks

didFailToDisplay will be called after calling showAd (Interstitial, Video, Rewarded Video, Offerwall) if there is no ad to show, or the ad is unable to display. An error will be provided.

private void OnEnable () {
     TDCallbacks.AdDidFailToDisplay += OnDidFailToDisplay;
}

// Unsubscribe from Tapdaq events
private void OnDisable () {
    TDCallbacks.AdDidFailToDisplay -= OnDidFailToDisplay;
}

private void OnDidFailToDisplay(TDAdEvent e) {
    TDDebugLogger.Log("-- Test Log -- " + e.adType + "(" + e.tag + ")" + ": " + e.message);
}

AdMob Targeting

AdMob content rating will be forwarded for every ad request to AdMob, to do this, set the value in the config after Tapdaq has initialised like so:

//After Tapdaq initialises
AdManager.SetAdMobContentRating("MA"); //G PG T MA
AdManager.SetIsAgeRestrictedUser(true); //COPPA/GDPR flag

The tag_for_under_age_of_consent flag will be sent to AdMob if the user is subject to GDPR and AgeRestrictedUser is set. The ChildDirectedTreatment COPPA flag will be sent if user is not known to be subject to GDPR and AgeRestrictedUser is set. Read more about AdMob Targeting here

6.2.4

Replaced Init methods to allow data to remain unknown if not retrieved from the user.

TDStatus enum has values FALSE, TRUE, UNKNOWN

New methods:

public class AdManager {
    public static void InitWithConsent (TDStatus isConsentGiven);
    public static void InitWithConsent (TDStatus isUserSubjectToGDPR, TDStatus isConsentGiven, TDStatus isAgeRestrictedUser)
}

Deprecated methods:

public class AdManager {
    public static void InitWithConsent (bool isConsentGiven) 
    public static void InitWithConsent (bool isConsentGiven, bool isAgeRestrictedUser)
}

6.2.2

GDPR

GDPR compliance has been added in this version, apps should acquire EU users consent for networks to provide personalised ads. Pass the consent to Tapdaq if consent is available at initialisation it should be added like so:

AdManager.InitWithConsent(true);

If consent is acquired mid session inform Tapdaq like so:

AdManager.setConsentGiven(true);

NOTE: Chartboost will not update consent mid session and must be set at initialisation

Age restricted users

Some networks ask if users are known to be under 16, this can also be set at initialisation or mid session like so:

AdManager.InitWithConsent(true, true); //Params Consent, IsAgeRestrictedUser

Set mid session like so:

AdManager.SetIsAgeRestrictedUser(true);

6.1.0

Play Services Resolver Updated to 1.2.61

Before importing TapdaqUnity.unitypackage delete the PlayServicesResolver folder from the Assets folder to prevent having duplicate/conflicting versions in your project.

Alternatively do not import the PlayServicesResolver folder if you want to keep your version.

6.0.0, 6.0.1

Known issues

iOS app will crash if methods that do not specify placement tags are used.

The workaround is to specify default placement tag when loading an ad, showing an ad or checking if an ad is ready to be shown.

Example:

// Instead of using:

AdManager.LoadInterstitial();
AdManager.ShowInterstitial();
AdManager.IsInterstitialReady();

AdManager.LoadVideo();
AdManager.ShowVideo();
AdManager.IsVideoReady();

AdManager.LoadRewardedVideo();
AdManager.ShowRewardedVideo();
AdManager.IsRewardedVideoReady();

// Use the following method:

AdManager.LoadInterstitial("default");
AdManager.ShowInterstitial("default");
AdManager.IsInterstitialReady("default");

AdManager.LoadVideo("default");
AdManager.ShowVideo("default");
AdManager.IsVideoReady("default");

AdManager.LoadRewardedVideo("default");
AdManager.ShowRewardedVideo("default");
AdManager.IsRewardedVideoReady("default");

5.9.0

Lifecycle Methods

Receptiv requires Android lifecycle events to be passed back to their SDK. This may be used by Tapdaq, or by other adapters in the future. You can read more about lifecycle methods in our Quickstart guide.

AdManager.OnApplicationPause must be called from any MonoBehaviour object script in each scene. Read more about OnApplicationPause unity method here.

Here's an example:

void OnApplicationPause(bool pauseStatus)
{
    AdManager.OnApplicationPause (pauseStatus);
}