Reward Banner 스크립트 Android
본 가이드는 Android 환경에서 스크립트 클릭 시, 리워드 지급을 위한 연동 방식을 기술합니다.
애드팝콘 SSP에서 제공하는 스크립트만을 노출 시키기 위한 웹뷰를 구성 한 뒤, 아래와 같이 설정하여 해당 웹뷰에서의 클릭을 체크 후 리워드를 지급합니다.
반드시 다른 웹뷰와 분리하여 웹뷰를 생성해야만 광고에 대한 클릭 처리가 정확히 됩니다.
1. WebView 추가
오직 Reward Banner 광고 만을 위한 WebView를 추가합니다.
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="none">
...
<WebView
android:layout_width="match_parent"
android:layout_height="100dp"
android:id="@+id/rcpc_webview"/>
...
</ScrollView>
</FrameLayout>2. WebView 세팅 및 랜딩
1) 광고 설정 순서
2) WebView 관련 설정
webView 관련 설정을 아래와 같이 진행합니다. (initializeWebViewSetting)
3) script 로드
애드팝콘 사업실로 부터 전달받은 아래 형태의 script를 webview에 로드합니다.(loadScript)
안드로이드 파라미터 정의
app_key
Y
string
매체용으로 발급된 광고 앱 키
placement_id
Y
string
매체용으로 발급된 광고 지면 아이디
adid
Y
string
Android 광고 식별자
network
N
string
""
네트워크 (mobile or wifi)
carrier
N
string
""
통신사
model
N
string
""
모델명
manufacturer
N
string
""
제조사
os_version
N
string
"0"
플랫폼 OS 버전
skip_mediation
N
boolean
false
미디에이션 광고 skip 여부 (true 전달시, 기본 설정 광고 노출)
단, script의 adid 매크로 값에는 ADID 값을 치환하여 전달해 주시면 됩니다.
ADID를 가져오는 방법은 아래의 링크를 참고해 주시기 바랍니다.
4) 클릭 발생 시 리워드 지급
해당 webview에서 클릭 발생 시, 클릭을 캐치하여 리워드 지급 후, 랜딩 주소로 랜딩 시켜줍니다.
Last updated
Was this helpful?