Skip to main content

SDK Integration

To display ads and generate revenue, you must first integrate the NAM SDK into your app.

Requirements

  • It is recommended to use the latest version of Android Studio
  • minSdkVersion 21 or higher

Integration

  1. Include the Maven Central Repository in the project-level Gradle configuration file.
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
// . . .
}
}

 

  1. Add the NAVER Ad Manager SDK dependencies to the app-level build file. The nam-core module is mandatory, and you can add mediation modules for each ad provider separately. For more details, refer to the Mediation Integration guide.
dependencies {
implementation(platform("com.naver.gfpsdk:nam-bom:8.3.1"))
implementation("com.naver.gfpsdk:nam-core") // NAM Core (required)
implementation("com.naver.gfpsdk.mediation:nam-nda") // for NAVER S2S mediation (optional)
// . . .
// add additional mediation modules if needed
}

 

  1. Set the NAM Publisher Code issued by the NAM platform or your contact person in the AndroidManifest.xml file as shown below. Use com.naver.gfpsdk.PUBLISHER_CD as the value for android:name.
<string name="nam_publisher_cd">YOUR_PUBLISHER_CODE</string>
<manifest>
<application>
<!-- Publisher Code 추가 (Required) -->
<meta-data
android:name="com.naver.gfpsdk.PUBLISHER_CD"
android:value="@string/nam_publisher_cd"/>
</application>
</manifest>
danger

The Publisher Code is a mandatory value. If this value is not added, the app will crash at startup, so please make sure to include it.


Additional Checklist

Below is a guide for additional considerations that may be necessary when integrating the NAM SDK.

AD ID

The AD ID (Google Play Advertising ID) is a unique advertising identifier provided by Android devices. It is an anonymous identifier designed to allow users to control ad personalization and is used by app developers and ad networks for user tracking and ad targeting.

To use the AD ID, the app must include the play-services-ads-identifier library dependency, and the Google Advertising ID option must be enabled in the user's device settings.

info

The NAM SDK has been tested based on version com.google.android.gms:play-services-ads-identifier:17.0.1.

AppSetID

AppSetID helps track users per publisher on the same device.

From NAM SDK version 4.4.0 and above, if you use the nam-dfp module or include dependencies for play-services or play-services-appset, the AppSetID will be included in the ad request parameters.

info

The NAM SDK has been tested based on version com.google.android.gms:play-services-appset:16.0.2.

When Using WebView

If the app integrating the NAM SDK uses a WebView where ads can be displayed through the GFP Web SDK, it is essential to register each WebView instance with the SDK. This is a critical feature to improve ad targeting accuracy and enhance ad revenue by communicating with websites that have the NAM Web SDK applied. Therefore, make sure to use version 8.2.4 or higher and apply the WebView Registration guide.

Network Security Configuration

Some providers deliver ads via HTTP. Starting from Android 9.0 (API 28), HTTP traffic is blocked by default, which can impact user experience and ad revenue. To maximize revenue, it is recommended to allow HTTP traffic. The affected ad providers include:


Ad Formats

info

You can find comprehensive samples in the GitHub repository NAM Android SDK.