Skip to main content

Advertisement Request Information

1. Advertisement Request Information

When requesting an advertisement suitable for each ad type, an AdParam object containing the information required for the advertisement request must be created.

Detailed targeting and reporting are applied with the customParam items.

val adParam = AdParam.Builder()
// . . .
.setAdUnitId("AOS_TEST_BANNER") // mandatory
.setCurrentPageUrl("https://www.naver.com")
.setRefererPageUrl("https://www.naver.com")
.addCustomParam("channelId", "41312")
.build()

Parameter Description

The parameters within the Adparam used when for advertisement requests have their unique roles.

  • Ad Unit ID (required)

    An essential param corresponding to the Ad Unit ID.

  • Current Page URL (optional)

    The Page URL of the current screen.

    This value is a parameter for targeting purposes and will be used when requesting advertisements of external demands.

  • RefererPageUrl (optional)

    A parameter for targeting purposes that will be used when requesting advertisements of external demands.

  • Custom Parameter (optional)

    A parameter for detailed targeting and reporting purposes that will be used in DFP and external demands.

    Discuss and confirm the keys and values with the NAM manager.

    Assign to setCustomParam() using a collection in the form of Map<String, String>, or assign multiple keywords using addCustomParam(String, String).

    Please refer to the examples in the DFP manual.

    If multiple values need to be transmitted with a single key, it can be done by separating the values with “|.”

  • Video-related parameters (required in video)

    Meta data required in video advertisements.

    • vsi: Video ad Schedule Id

      vri: Video ad schedule Request id

      vcl: Video Content Length

      vsd: Video StartDelay

      vrr: Video ad Request a Remind ad

  • Keyword (optional in video)

    The keywords related to the current screen.

    The keyword values will be used for detailed targeting and reporting in IMA.


2. SDK Global Settings

Other than the AdParam, which is set for each ad request, common settings are available through SdkProperties, which are SDK-related settings, and UserProperties, which are user-related settings used for targeting, etc.

The list of available SDK-related settings is as follows.

2-1-1. ProviderOption
  • addProviderOptions(GfpProviderOptions)

    Some DSPs may require TestMode settings to receive test advertisements.

    (DfpProviderOptions, FanProviderOptions, UnityProviderOptions, NdaProviderOptions)

    If the setting is not set, the TestMode of each advertising provider will be set as Off by default.

Below is the API list related to ad request Timeout. The long value entered in the setting must be set to a positive millis value.

The default value is set to 60 seconds.

methoddesc
bannerAdRequestTimeout(long)Set the timeout for banner advertisement (GfpBannerAdView)
videoAdRequestTimeout(long)Set the timeout for video advertisement (GfpVideoAdScheduleManager)
unifiedAdRequestTimeout(long)Set the timeout value for advertisements called through the advertisement loader (GfpAdLoader)
rewardedAdRequestTimeout(long)Set the timeout value for reward-type advertisements (GfpRewardedAdManager)
interstitialAdRequestTimeout(long)Set the timeout value for interstitial advertising (GfpInterstitialAdManager)
2-1-3. Mute Option

Reward-type advertisements provide an option to mute the video. However, this option is not available in In-Stream advertisements

2-1-4. For example
GfpSdk.setSdkProperties(GfpSdk.getSdkProperties().buildUpon()
.addProviderOptions(DfpProviderOptions.Builder()
.setTestMode(false)
.build())
.addProviderOptions(FanProviderOptions.Builder()
.setTestMode(false)
.build())
.addProviderOptions(NdaProviderOptions.Builder().build())
.addProviderOptions(UnityProviderOptions.Builder()
.setTestMode(false)
.build())
.bannerAdRequestTimeout(60_000L)
.unifiedAdRequestTimeout(60_000L)
.videoAdRequestTimeout(60_000L)
.interstitialAdRequestTimeout(60_000L)
.rewardedAdRequestTimeout(60_000L)
.muteAudio(true)
.build())
methoddesc
gender(GenderType)Set the user's gender
yob(Integer)Set the user's birth year
country(String)Set the user's country
language(String)Set the user's language
id(String)Set the media-side user identifier value usable for SDK log tracking
customParameter()Globally used custom parameter (from 6.0.0)
abt(String)Set the AB Test segment ID when using NAVER’s AB Test Library (from 6.4.2)
childDirectedTreatment(Boolean)Indicate a page or app being a child-directed service under the Children's Online Privacy Protection Act (COPPA) (from 6.1.0)
underAgeOfConsent(Boolean)Indicate the ad request status for non-adult users. (from 6.1.0)
info

UserProperties.customParameter has been added from NAM SDK 6.0.0 and is a globally used custom parameter. It can be used by merging with AdParam.customParameter, which is used for each ad request.

GfpSdk.setUserProperties(GfpSdk.getUserProperties().buildUpon()
// .id("User Id in your service")
// .underAgeOfConsent()
.yob(1987)
.country("KR")
.language("KO")
.gender(GenderType.MALE)
.userAgentFactory(object: UserAgentFactory() {
override fun create(context: Context): String {
return "CustomUserAgentString"
}
})
.build())