Configure Mediation
Test Mode
Mediation 1.1.0 introduces a Test Mode method that will allow you to test your partner integrations and get their test ads. Refer to the Mediation Android and Mediation iOS integration documents on how to enable Test Mode.
Privacy Methods
The following privacy methods are used to set different privacy settings:
COPPA
setSubjectToCoppa
setSubjectToCoppa
HeliumSdk.setSubjectToCoppa(true);
// or
HeliumSdk.setSubjectToCoppa(false);
-
By sending
setSubjectToCoppa (true)
, you indicate that you want your content treated as child-directed for purposes of COPPA. We will take steps to disable interest-based advertising for such ad requests. -
By sending
setSubjectToCoppa (false)
, you indicate that you don't want your content treated as child-directed for purposes of COPPA. You represent and warrant that your applications and services are not directed towards children and that you will not provide any information to Mediation from a user under the age of 13
GDPR
setSubjectToGDPR
setSubjectToGDPR
HeliumSdk.setSubjectToGDPR(true);
// or
HeliumSdk.setSubjectToGDPR(false);
- By sending
setSubjectToGDPR (true)
, you indicate that GDPR is applied to this user from your application. - By sending
setSubjectToGDPR (false)
, you indicate that GDPR is not applied to this user from your application.
setUserHasGivenConsent
setUserHasGivenConsent
HeliumSdk.setUserHasGivenConsent(true);
// or
HeliumSdk.setUserHasGivenConsent(false)
-
By sending
setUserHasGivenConsent (true)
, you indicate that this user from your application has given consent to share personal data for behavioral targeted advertising. -
By sending
setUserHasGivenConsent (false)
, you indicate that this user from your application has not given consent to use its personal data for behavioral targeted advertising, so only contextual advertising is allowed.
CCPA
setCCPAConsent
setCCPAConsent
HeliumSdk.setCCPAConsent(true);
// or
HeliumSdk.setCCPAConsent(false);
-
By sending
setCCPAConsent (true)
, you indicate that this user from your application has given consent to share personal data for behavioral targeted advertising under CCPA regulation. -
By sending
setCCPAConsent (false)
, you indicate that this user from your application has not given consent to allow sharing personal data for behavioral targeted advertising under CCPA regulation.
Note:
Mediation will send CCPA information to the bidding network and set the CCPA information for the adapters.
Keywords
As of Mediation 2.9.0, the Mediation SDKs introduces keywords: key-value pairs to enable real-time targeting on line items.
Set Keywords
To set keywords, you will need to first create a Mediation ad object, then use the setKeyword method to add key-value keywords pair.
// Create a Helium Ad object.
HeliumInterstitialAd interstitialAd =
HeliumSdk.getInterstitialAd(PLACEMENT_INTERSTITIAL);
HeliumRewardedAd rewardedAd =
HeliumSdk.getRewardedAd(PLACEMENT_REWARDED);
HeliumBannerAd bannerAd =
HeliumSdk.getBannerAd(PLACEMENT_BANNER, BANNER_SIZE);
// Set a Keyword
this.interstitialAd.setKeyword("i12_keyword1", "i12_value1");
this.rewardedAd.setKeyword("rwd_keyword1", "rwd_value1");
this.bannerAd.setKeyword("bnr_keyword1", "bnr_value1");
Remove Keywords
To remove keywords, simply use the removeKeyword method and pass the key you would like to remove.
// Remove Keyword.
this.interstitialAd.removeKeyword("i12_keyword1");
this.rewardedAd.removeKeyword("rwd_keyword1");
this.bannerAd.removeKeyword("bnr_keyword1");
Note:
Keywords has restrictions for setting keys and values. The maximum characters allowed for keys is 64 characters. The maximum characters for values is 256 characters.
Rewarded Callbacks
Setting the User ID and Custom Data through the SDK
Setting User Identifier
The user identifier property is found on the HeliumSDK
object. This property may be set anytime after SDK initialization.
HeliumSdk.SetUserIdentifier("user");
Setting Custom Data
The custom data property is found on the HeliumRewardedAd
instance, and has a maximum character limit of 1000 characters. In the event that the limit is exceeded, the customData
property will be set to null
.
Custom data may be set at any time before calling Show()
_rewardedAd = HeliumSDK.GetRewardedAd(“placement”);
var bytesToEncode = Encoding.UTF8.GetBytes("{\"testkey\":\"testvalue\"}");
var encodedText = Convert.ToBase64String(bytesToEncode);
_rewardedAd.SetCustomData(encodedText);
_rewardedAd.Load();
See: Mediation SDK: Manage Placement's Rewarded Callbacks for configuration setup
Updated 4 days ago