애드팝콘 SSP SDK 연동가이드
애드팝콘 홈페이지애드팝콘 SSP 콘솔 바로가기
  • 개요
  • Android
    • 기본 설정
    • 배너 광고
    • 전면 광고
    • 전면 비디오 광고
    • 리워드 비디오 광고
    • 비디오 믹스 광고
    • 보상형 광고 플러스 연동(v1.0)
    • 보상형 광고 플러스 연동(v1.5)
    • 네이티브 광고
      • 네이티브 광고 레이아웃 구성 가이드
        • AdPopcornSSP NativeAdView
    • 스플래시 광고
    • 모달 광고
    • 팝콘텐츠 광고
    • 응답 에러 코드 및 샘플 프로젝트
    • 미디에이션(Android)
      • AdFit
      • Admob
      • AdForus
      • ADOP
      • GAM (Google Ad Manager)
      • Cauly
      • FAN(Facebook Audience Network)
      • MezzoMedia
      • Mintegral
      • Mobwith
      • UnityAds
      • Vungle(LiftOff)
      • Fyber
      • Pangle
      • AppLovin
      • AppLovinMax
      • NAM (Naver Ad Manager)
      • CoupangCPM
    • AppLovin Max Android Mediation 가이드
    • 릴리즈 노트
  • iOS
    • 기본 설정
      • CocoaPod 설치
      • SPM 설치
      • 수동 설치
    • 배너 광고
    • 전면 광고
    • 전면 비디오 광고
    • 리워드 비디오 광고
    • 보상형 광고 플러스 연동(1.0)
    • 네이티브 광고
      • NativeAdView layout
        • 직접 설정
        • 템플릿 사용
    • 스플래시 광고
    • 모달 광고
    • 팝콘텐츠 광고
    • 응답 에러 코드 및 샘플 프로젝트
    • 미디에이션
      • NAM (Naver Ad Manager)
      • AdFit
      • AppLovin
      • AppLovinMAX
      • UnityAds
      • Vungle
      • FBAudienceNetwork (FaceBook)
      • AdMob
      • Google AdManager(GAM)
      • ADOP
      • Fyber
      • Mezzo
      • Mintegral
      • Pangle
      • Cauly
      • SDK, Mediation ver 호환성
    • AppLovin Max iOS Mediation 가이드
    • 릴리즈노트
  • Unity
    • Unity (Android)
      • 기본 설정
      • 배너 광고
      • 전면 광고
      • 리워드 비디오 광고
      • 비디오 믹스 광고
      • 네이티브 광고
      • 보상형 광고 플러스 연동(v1.0)
      • 보상형 광고 플러스 연동(v1.5)
      • 미디에이션 Unity Android
    • Unity (iOS)
      • 기본 설정
      • 배너 광고
      • 전면 광고
      • 리워드 비디오 광고
      • 네이티브 광고
      • 보상형 광고 플러스 연동(v1.0)
      • 미디에이션 Unity iOS
    • 에러 코드
  • Flutter
    • 기본 설정
    • 배너 광고
    • 전면 광고
    • 전면 비디오 광고
    • 리워드 비디오 광고
    • 보상형 광고 플러스 연동(beta)
    • 네이티브 광고
    • 팝콘텐츠 광고
  • React Native(beta)
    • 기본 설정
    • 배너 광고
    • 전면 광고
    • 전면 비디오 광고
    • 리워드 비디오 광고
    • 네이티브 광고
  • Web SDK
  • 하이브리드 앱 - Web(APM + NAM)
    • 네이티브 Side 연동(Android)
    • 네이티브 Side 연동(iOS)
    • WebPage Side 연동
    • 광고 ID 수동 세팅
  • 하이브리드 앱- Web(Adfit)
    • Android
    • iOS
  • 테스트 코드
  • 리포트 API
    • 애드팝콘 SSP Report API
    • DSP Report API
    • Publisher API (Report)
    • Publisher API (Metadata)
    • Adserver Report API
    • Popcontent Report API
  • 추가 기능 연동가이드
    • Adfit Bizboard Android 연동 가이드
    • 웹 CS 페이지 연동
    • AppLovin Custom Network
      • Android
      • iOS
    • KT Library
    • 원스토어 연동가이드
      • 애드팝콘 SSP SDK for Onestore
      • 원스토어 Ads 래핑 가이드(내부용)
        • 배너 광고
        • 전면 광고
        • 전면 비디오 광고
        • 리워드 비디오 광고
        • 네이티브 광고
        • SSP 미디에이션
        • 에러 코드 및 외부 노출 함수
        • 테스트 지면 키
        • AAR 라이브러리 목록
    • 쿠팡 연동가이드
      • 쿠팡 포스트백 연동
      • 쿠팡 EP 리스트 연동
      • 쿠팡 리포트 API 연동
        • 쿠팡 일별 리포트 API
        • 쿠팡 API - Report
        • 쿠팡 API - Product list
    • Reward Banner 스크립트 연동가이드
      • Reward Banner 스크립트 Android
      • Reward Banner 스크립트 iOS
    • 차단관리 파일 가이드
    • 커스텀 타입 연동 가이드
      • 커스텀 타입(Android)
      • 커스텀 타입(iOS)
    • 쿠팡 클릭 이벤트 페이지 연동 가이드
  • 팝콘텐츠 연동가이드
    • WebView 직접 연동
    • 리워드 콜백
  • 웹 SSP
    • 쿠키 매칭
    • Web Header Bidding(WIP)
Powered by GitBook
On this page
  • SDK 설치
  • AndroidManifest.xml 설정
  • 기본설정
  • 네이티브 광고 추가 설정

Was this helpful?

  1. Android
  2. 미디에이션(Android)

CoupangCPM

쿠팡 네이티브 광고 미디에이션 레이아웃 가이드 입니다. AdPopcornSSP v3.5.3 버전부터 지원합니다.

SDK 설치

  • v1.3.0 호환 지원합니다.

api "com.coupang:ads:1.3.0"
  • build.gradle 프로젝트 레벨에 저장소 설정을 추가합니다.

allprojects {
    repositories {
        maven {
            url "https://raw.githubusercontent.com/coupang-ads-sdk/android/main"
        }
    }
}

AndroidManifest.xml 설정

SDK의 정상 동작을 위해선 AnroidManifest.xml 파일 내에 Key-Value 값을 설정해야 합니다.

입력해야 되는 키 값에 대해서는 사업팀(monetize@adpopcorn.com)에 문의해 주세요.

<meta-data android:name="coupang_ads_affiliate_id"
            android:value="YOUR_COUPANG_AFFILAIATE_ID"/>
<meta-data android:name="coupang_ads_sub_id"
            android:value="YOUR_COUPANG_ADS_SUB_ID"/>

기본설정

쿠팡 미디에이션 추가 시, Activity 화면에서 배너, 전면 광고를 연동하고자 할 경우, Activity에 LifecycleOwner 를 구현해야 광고가 노출될 수 있습니다. ComponentActivity 사용 시에는 아래 추가 연동이 필요 없습니다.

import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.LifecycleRegistry;

public class MainActivity extends Activity implements LifecycleOwner {
    private final LifecycleRegistry lifecycleRegistry = new LifecycleRegistry(this);
	
    protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	lifecycleRegistry.handleLifecycleEvent(Lifecycle.Event.ON_CREATE);
    }		
	
    @Override
    protected void onStart() {
        super.onStart();
        lifecycleRegistry.handleLifecycleEvent(Lifecycle.Event.ON_START);
    }

    @Override
    protected void onResume() {
        super.onResume();
        lifecycleRegistry.handleLifecycleEvent(Lifecycle.Event.ON_RESUME);
    }

    @Override
    protected void onPause() {
        super.onPause();
        lifecycleRegistry.handleLifecycleEvent(Lifecycle.Event.ON_PAUSE);
    }

    @Override
    protected void onStop() {
        super.onStop();
        lifecycleRegistry.handleLifecycleEvent(Lifecycle.Event.ON_STOP);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        lifecycleRegistry.handleLifecycleEvent(Lifecycle.Event.ON_DESTROY);
    }

    @Override
    public Lifecycle getLifecycle() {
        return lifecycleRegistry;
    }
}

네이티브 광고 추가 설정

다른 타입의 광고와 다르게 네이티브 광고에서 미디에이션 사용하고자 할 경우에는 레이아웃에 대한 추가 설정이 필요합니다.

AdPopcornSSPNativeAd layout 내에 Coupang 광고 영역을 추가해 주세요

  • native_ad_mediation_layout.xml 샘플

<?xml version="1.0" encoding="utf-8"?>
<com.igaworks.ssp.part.nativead.AdPopcornSSPNativeAd
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/adpopcorn_native_ad"
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <com.coupang.ads.custom.AdsNativeView
        android:id="@+id/coupang_ads_native_view"
        android:layout_width="300dp"
        android:layout_height="250dp"
        android:layout_gravity="center_horizontal"
        android:visibility="invisible">
        <include layout="@layout/coupang_native_ad_unit_layout"/>
    </com.coupang.ads.custom.AdsNativeView>    

</com.igaworks.ssp.part.nativead.AdPopcornSSPNativeAd>

  • coupang_native_ad_unit_layout.xml 샘플

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/call_to_action"
    android:layout_width="300dp"
    android:layout_height="250dp"
    android:background="@drawable/bg_banner_item_radius">


    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginTop="18dp"
        android:lineSpacingExtra="3sp"
        android:text="이런건 어때요?"
        android:textColor="#111111"
        android:textSize="16sp"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />


    <ImageView
        android:id="@+id/logo"
        android:layout_width="63dp"
        android:layout_height="14dp"
        android:layout_marginTop="20dp"
        android:layout_marginEnd="8dp"
        android:src="@drawable/ic_ads_coupang_logo_350x80"
        app:layout_constraintEnd_toStartOf="@+id/opt_out"
        app:layout_constraintTop_toTopOf="parent" />


    <com.coupang.ads.view.image.RoundImageView
        android:id="@+id/main_image"
        android:layout_width="110dp"
        android:layout_height="110dp"
        android:layout_marginTop="53dp"
        android:layout_marginEnd="16dp"
        android:scaleType="centerCrop"
        android:src="@drawable/ic_ads_placeholder_loading"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:radius="4dp" />


    <TextView
        android:id="@+id/title"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginTop="53dp"
        android:layout_marginEnd="10dp"
        android:ellipsize="end"
        android:maxLines="2"
        android:textColor="#111111"
        android:textSize="14sp"
        android:textStyle="normal"
        app:layout_constraintEnd_toStartOf="@id/main_image"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"/>


    <com.coupang.ads.custom.widget.AdsProductStarRating
        android:id="@+id/rating"
        style="@style/StarRating.Medium"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginTop="10dp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/title"/>

    <TextView
        android:id="@+id/price"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginTop="10dp"
        android:ellipsize="end"
        android:includeFontPadding="false"
        android:maxLines="1"
        android:textAppearance="@style/T6.Regular"
        android:textColor="#cb1400"
        android:textSize="16sp"
        android:textStyle="bold"
        app:layout_constraintEnd_toStartOf="@+id/main_image"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/rating" />


    <ImageView
        android:id="@+id/deliver"
        android:layout_width="56dp"
        android:layout_height="14dp"
        android:layout_marginStart="16dp"
        android:layout_marginTop="6dp"
        android:scaleType="centerCrop"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/price" />

    <TextView
        android:id="@+id/positive"
        android:layout_width="268dp"
        android:layout_height="38dp"
        android:layout_margin="16dp"
        android:background="@drawable/bg_bt_blue"
        android:gravity="center"
        android:text="바로가기 >"
        android:textColor="@color/rds_blue_600"
        android:textSize="14sp"
        android:textStyle="bold"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />

    <ImageView
        android:id="@id/opt_out"
        style="@style/AdsOptOutImageView"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>

xml에서 생성한 ui component를 sdk에서 제공하는 setCoupangViewBinder API를 이용해 아래와 같이 설정해 줍니다.

CoupangViewBinder coupangViewBinder = new CoupangViewBinder.Builder(R.id.coupang_ads_native_view, R.layout.coupang_native_ad_unit_layout)
                .optOutViewId(R.id.opt_out)
                .deliverViewId(R.id.deliver)
                .logoViewId(R.id.logo)
                .callToActionViewId(R.id.call_to_action)
                .mainImageViewId(R.id.main_image)
                .priceViewId(R.id.price)
                .ratingViewId(R.id.rating)
                .titleViewId(R.id.title)
                .build();
adPopcornSSPNativeAd.setCoupangViewBinder(coupangViewBinder);

CoupangViewBinder Builder 생성 시, view id(R.id.coupang_ads_native_view)와 layout id(R.layout.coupang_native_ad_unit_layout)는 필수로 넘겨주어야 하며, 그 외 ui component에 대해서는 사용하는 리소스에 대해서만 설정해 주면 됩니다.

PreviousNAM (Naver Ad Manager)NextAppLovin Max Android Mediation 가이드

Last updated 24 days ago

Was this helpful?