Waterfall Custom Adapter
BidMachine custom adapter allows you to use the BidMachine ad platform within your existing IronSource mediation. BidMachine supports banners, MRECs, interstitials and rewarded videos.
How to Enable BidMachine Waterfall in IronSource SDK Networks Module
Add BidMachine to IronSource waterfalls
-
Access the SDK Networks page. Go to the SDK Networks section in your Ironsource account.
-
Setup Ad Units. In the custom section, select BidMachine Waterfall. Click on the Setup button to start the configuration process.
-
Add Placement ID. Input the Placement ID (e.g.
bm_rewarded_15
). Make sure to enter the correct Placement ID for your setup. -
Add Price. Set the appropriate price for the placement.
-
Select the Targeted Mediation Group. Choose the mediation group that targets your audience.
-
Input the Rate. Enter the rate for your waterfall placement. It's important for sorting the waterfalls correctly.
-
Click Save. After entering all necessary details, click the Save button to store the record.
BidMachine supports multiple placements in the waterfall. It is highly recommended to enter the Rate, as this determines the correct order in the waterfalls
Add the BidMachine Bidding Adapter to Your Build
Android
Min Android SDK version - 21 (5.0 Lollipop)
To integrate the BidMachine SDK with Gradle, make sure the following Maven URL exists in your build.gradle
repositories {
mavenCentral()
maven {
url "https://android-sdk.is.com/"
}
maven {
url "https://artifactory.bidmachine.io/bidmachine"
}
}
In your build.gradle file add the following dependency which includes the BidMachine adapter for use within IronSource’s mediation platform:
dependencies {
implementation "io.bidmachine:ads.adapters.ironsource:3.0.1.4"
implementation "io.bidmachine:ads:3.0.1"
}
iOS
IOS deployment target 13.0 or above, XCode 14.3.1 or above.
You can download the SDK through CocoaPods as a dependency.
In your Podfile file add the following dependency which includes the BidMachine adapter for use within IronSource's mediation platform:
source 'https://github.com/cocoapods/specs'
pod 'BidMachineIronSourceCustomAdapter', '3.0.1'
Privacy settings
In order to comply with GDPR, CCPA, and COPPA, you will need to set the below flags in the BidMachine adapter. This is best done before initializing the IronSource network.
- GDPR aka userConsent (Requirement for EU)
- COPPA aka ageRestrictedUser (age-restricted user, such as users under the age of 13)
- CCPA aka doNotSell (California Consumer Privacy Laws)
SDK automatically retrieves CCPA string from UserDefaults
/SharedPreferences
.
If you would like to pass CCPA string according to IAB standards,
please add it in UserDefaults
/SharedPreferences
by use any iAB
certified CMP platform. More information
here.
Also, SDK automatically retrieves GPP from UserDefaults
/SharedPreferences
. If you would like to
pass GPP according to IAB standards, please add it in UserDefaults
/SharedPreferences
. More
information here
and here.
Android
- Java
- Kotlin
// Set COPPA
BidMachine.setCoppa(@Nullable Boolean);
// Set subject to GDPR
BidMachine.setSubjectToGDPR(@Nullable Boolean);
// Set consent config
BidMachine.setConsentConfig(boolean, @Nullable String);
// Set CCPA
BidMachine.setUSPrivacyString(@Nullable String);
// Set GPP
BidMachine.setGPP(@Nullable String, @Nullable List<Integer>);
// Set COPPA
BidMachine.setCoppa(@Nullable Boolean)
// Set subject to GDPR
BidMachine.setSubjectToGDPR(@Nullable Boolean)
// Set consent config
BidMachine.setConsentConfig(boolean, @Nullable String)
// Set CCPA
BidMachine.setUSPrivacyString(@Nullable String)
// Set GPP
BidMachine.setGPP(@Nullable String, @Nullable List<Integer>)
Basically, the same privacy values that are passed to IronSource SDK, should also be passed onto the BidMachine SDK. If a privacy value is not passed to IronSource then it can also be omitted for BidMachine.
Example if user is age restricted:
- Java
- Kotlin
IronSource.setMetaData("is_child_directed","true");
BidMachine.setCoppa(true);
IronSource.setMetaData("is_child_directed","true")
BidMachine.setCoppa(true)
otherwise:
- Java
- Kotlin
IronSource.setMetaData("is_child_directed","false");
BidMachine.setCoppa(false);
IronSource.setMetaData("is_child_directed","false")
BidMachine.setCoppa(false)
iOS
- Swift
- Objective-C
import BidMachine
BidMachineSdk.shared.regulationInfo.populate {
$0.withCOPPA(true)
.withGDPRZone(true)
.withGDPRConsent(true)
.withGDPRConsentString("")
.withUSPrivacyString("")
.withGPP("", [])
}
#import <BidMachine/BidMachine.h>
[[BMSdk sharedSdk] regulationInfo].populate {
$0.withCOPPA(true)
.withGDPRZone(true)
.withGDPRConsent(true)
.withGDPRConsentString("")
.withUSPrivacyString("")
.withGPP("", @[])
}
Basically, the same privacy values that are passed to IronSource SDK, should also be passed onto the BidMachine SDK. If a privacy value is not passed to IronSource then it can also be omitted for BidMachine.
Example if user is age restricted:
- Swift
- Objective-C
IronSource.setMetaDataWithKey("BidMachine_COPPA", value: "Yes")
[IronSource setMetaDataWithKey:@"BidMachine_COPPA" value:@"Yes"];
otherwise:
- Swift
- Objective-C
IronSource.setMetaDataWithKey("BidMachine_COPPA", value: "No")
[IronSource setMetaDataWithKey:@"BidMachine_COPPA" value:@"No"];