IronSource Plugin

This plugin allows you use IronSource ads and mediation

Platforms:

works on Android and iOS

Setup:

Go to Iron Source website (https://www.ironsrc.com) and create account. Then go to apps and create an app for android and/or iOS

If you want to setup mediation go here and setup each network https://platform.ironsrc.com/partners/monetize/mediation/setup

Functions:

ironSource.init(listener, params)

— init function

listener(function) returns and event in the Events section bellow

params(table) androidAppKey = app key for android(string), iOSAppKey = app key for iOS(string), clientSideCallback= boolean (default is false), GDPR = boolean (default is false), enableATT = boolean(shows App Tracking Transparency pop up before initing and returns events (default is true)),
enableRewardVideo(boolean) = boolean (init reward videos(default is true)), enableInterstitial(boolean) = boolean (should init interstitial(default is true)), enableOfferwall(boolean) = boolean (should init offerwall(default is true)), enableBanner(boolean) = boolean (should init banner(default is true))

ironSource.load(type, params)

— load ad

type(string) “banner”(note show banners before loading), “interstitial”

params (table) on “banner”, the param “placement” can be added, also tablet(boolean)(default if false), can be added.

ironSource.show(type, params)

— show ads

type(string) “banner”, “interstitial”, “offerwall”, “rewardedVideo”

params (table) on “banner” position(string)= “top” or “bottom”. On “interstitial”, “offerwall”, “rewardedVideo” the param “placement” can be added

ironSource.hide(type)

— hides banners until .show is called again

type(string) “banner”

ironSource.isLoaded(type)

— returns boolean

type(string) “banner”, “interstitial”, “offerwall”, “rewardedVideo”

ironSource.setMetaData(key, value)

— set meta data for Iron Source

key(string)

value(string)

Examples: (for CCPA)ironSource.setMetaData("do_not_sell", "true"), (Apps with Age Gates) ironSource.setMetaData("is_child_directed","true")

(COPPA AdColony)ironSource.setMetaData("AdColony_COPPA","true"), (AppLovin Age Restriction) ironSource.setMetaData("AppLovin_AgeRestrictedUser","true")

(CacheFlag Facebook) ironSource.setMetaData("Facebook_IS_CacheFlag","IMAGE"), (Admob Ad Content filtering) ironSource.setMetaData("AdMob_MaxContentRating","MAX_AD_CONTENT_RATING_G")(other values MAX_AD_CONTENT_RATING_G, MAX_AD_CONTENT_RATING_PG, MAX_AD_CONTENT_RATING_T, MAX_AD_CONTENT_RATING_MA)

ironSource.setProperties(properties)

— properties(table) key values pairs can be

type(string) “banner”, “interstitial”, “offerwall”, “rewardedVideo”

age = number,

dynamicUserId (“The Dynamic UserID is a parameter that can be changed throughout the session and will be received in the server-to-server ad rewarded callbacks.”) = string ,

gender = “male”, “female”, “unknown”,

userId = string,

mediationSegment = string,

mediationType = string

ironSource.getRewardVideoPlacementInfo(placement)

— returns table with rewardAmount(number), rewardName(string), isRewardedVideoPlacementCapped(boolean)

placement(string)

ironSource.getOfferwallCredits()

ironSource.getSize()

— gets size of banners (note banner must be showing and loaded to get size) returns height(number)

ironSource.getAdId()

return ad id for test mode (string)

ironSource.debugMode()

-- prints sdk intergration for validation

ironSource.destroyBanner()

— destroy banner

ironSource.setFBTrackingEnabled(shouldEnable)

— Only for iOS (Use for Facebook Ads iOS 14+)

shouldEnable(boolean) set based on ATT Preference

Events:

return in lis function on .init()

App Tracking Transparency events(if enableATT is true and iOS 14+):

phase == “att event”, status == “not determined”

phase == “att event”, status == “authorized”

phase == “att event”, status == "denied"

phase == “att event”, status == "restricted"

Banner:

phase == “adLoaded”, isError == false, type == “banner”

phase == “adLoadedFailed”,isError == true,error == error message(string),type == “banner”

phase == “adClicked”, isError == false, type == “banner”

phase == “adScreenPresented”, isError == false, type == “banner”

phase == “adScreenDismissed”, isError == false, type == “banner”

phase == “adLeftApplication”, isError == false, type == “banner”

Interstitial:

phase == “adReady”,isError == false,type == “interstitial”

phase == “adLoadFailed”, isError == true, error == error message(string), type == “interstitial”

phase == “adOpened”, isError == false, type == “interstitial”

phase == “adClosed”, isError == false, type == “interstitial”

phase == “adShowSucceeded”, isError == false, type == “interstitial”

phase == “adShowFailed”, isError == false, type == “interstitial”, error == error message(string)

phase == “adClicked”, isError == false, type == “interstitial”

Offerwall:

phase == “wallAvailable”, isError == false, available == boolean(could be false or true), type == “offerwall”

phase == “wallOpened”, isError == false, type == “offerwall”

phase == “wallShowFailed”, isError == true, type == “offerwall”, error == error message(string)

phase == “wallCredited”, isError == false, type == “offerwall”, credits == (number) credits user has earned, totalCredits == (number) total credits user has earned, totalCreditsFlag == (boolean) if credits will be equal to total credits

phase == “wallCreditsFailed”, isError == true, type == “offerwall”, error == error message(string)

phase == “wallClosed”, isError == false, type == “offerwall”

Reward Video:

phase == “availabilityChanged”, isError == false, type == “rewardedVideo”, available == boolean(could be false or true)

phase == “adClosed”, isError == false, type == “rewardedVideo”

phase == “adOpened”, isError == false, type == “rewardedVideo”

phase == “adStarted”, isError == false, type == “rewardedVideo”

phase == “adEnded”, isError == false, type == “rewardedVideo”

phase == “adRewarded”, isError == false, type == “rewardedVideo”, rewardName == reward name from video ad(string), rewardAmount == reward amount from video ad(number)

phase == “adShowError”, isError == true, type == “rewardedVideo”, error == error message(string)

phase == "didClickRewardedVideo", isError == false, type == “rewardedVideo”

Impression Data:

adSource == the ad network used for impression(string), adFormat == also know as the ad unit(string), type == "impressionData", adUnitName == also know as the instance name (string), value == revenue of impression (string), adPlatfrom== "ironSource", isError == false

Firebase Analytics docs for logging impression to Firebase

iOS 14:

Iron Source Plugin has been updated for iOS 14. Please add SKAdNetworkItems listed below in build.settings.

As for App Tracking Transparency(ATT) in iOS 14, Iron Source recommends showing a pop up and requesting permission before .init().

To show/request ad tracking please use and read info about the ATT Plugin. If you don't request permission or permission is denied, Iron Source's ads will not be targeted via the devices identity for Advertisers (IDFA).

For showing Facebook Ads please use .setFBTrackingEnabled api above

Google Play Families programs:

In order to be in the Families section on Google Play you must do the following

1. Rebuild and use the lastest Iron Source Plugin(3/23/2022, 1.20)

2. add remove "com.google.android.gms.permission.AD_ID" by adding the following to you Build.settings

3. Set MetaData "IS_DeviceID_OptOut" and "IS_Child_Directed" to "true" before init

For mixed audience:

1. Rebuild and use the lastest Iron Source Plugin(3/23/2022, 1.20)

2. If the user is a children or is an unknown age set MetaData "IS_DeviceID_OptOut" and "IS_Child_Directed" to "true" before init

Build Settings:

Helpful Links:

Iron Source Knowledge Center

Get Plugin

Example

Support