Skip to main content

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

  1. Access the SDK Networks page. Go to the SDK Networks section in your Ironsource account.

  2. Setup Ad Units. In the custom section, select BidMachine Waterfall. Click on the Setup button to start the configuration process.

  3. Add Placement ID. Input the Placement ID (e.g. bm_rewarded_15). Make sure to enter the correct Placement ID for your setup.

  4. Add Price. Set the appropriate price for the placement.

  5. Select the Targeted Mediation Group. Choose the mediation group that targets your audience.

  6. Input the Rate. Enter the rate for your waterfall placement. It's important for sorting the waterfalls correctly.

  7. Click Save. After entering all necessary details, click the Save button to store the record.

success

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

info

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

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:

build.gradle
dependencies {
implementation "io.bidmachine:ads.adapters.ironsource:3.0.1.4"
implementation "io.bidmachine:ads:3.0.1"
}

iOS

info

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:

Podfile
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)
Local Storage Support

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

// 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:

IronSource.setMetaData("is_child_directed","true")
BidMachine.setCoppa(true)

otherwise:

IronSource.setMetaData("is_child_directed","false")
BidMachine.setCoppa(false)

iOS

import BidMachine
BidMachineSdk.shared.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:

IronSource.setMetaDataWithKey("BidMachine_COPPA", value: "Yes")

otherwise:

IronSource.setMetaDataWithKey("BidMachine_COPPA", value: "No")