배너 광고

배너 광고는 일반적으로 마케팅 메시지를 전달하고 사용자의 행동을 촉구할 수 있도록 만들어진 고정 또는 애니메이티드 이미지 이미지 및 텍스트를 포함한 그래픽 광고를 말합니다. 모든 유형의 앱은 배너 광고를 통해 수익화할 수 있습니다.

다음 과정을 통해 배너 광고 수익화를 시작해 보십시오.

배너 광고 설정

앱을 추가한 후 BANNER AD를 선택하여 배너 광고 유형에 맞는 배치를 생성합니다.

배너 광고 배치를 생성하면 배치 ID를 사용할 수 있습니다.

배너 광고 생성

IMBannerUIView 하위 클래스로, 사용자의 터치에 반응하는 HTML5 광고를 표시합니다.

InMobi SDK는 배너 광고를 구현하는 2개의 메커니즘을 제공합니다.

a. 프로그래밍적 인스턴스화

  1. 헤더를 가져오고 ViewController.h 파일에서 배너 인스턴스를 선언합니다. ViewController 헤더 파일의 내용은 다음과 같습니다.

    #import <uikit uikit.h="">
    @import InMobiSDK;
    @interface ViewController : UIViewController <imbannerdelegate>
    @property (nonatomic, strong) IMBanner *banner;
    @end
    		</imbannerdelegate></uikit>
    
  2. 배너 오브젝트를 인스턴스화합니다. ViewController.m 파일의 내용은 다음과 같습니다.

    - (void)viewDidLoad {
     [super viewDidLoad];
    self.banner = [[IMBanner alloc] initWithFrame:CGRectMake(0, 0, 320, 50)
    placementId:@"Insert your placement ID here"];
    self.banner.delegate = self;
    [self.view addSubview:self.banner];
    [self.banner load];
    //[self.banner shouldAutoRefresh:YES];
    //[self.banner setRefreshInterval:90];
    }
    
    


    IMBanner는 60초마다 새로고침되도록 기본 설정되어 있습니다. 임의로 새로고침 주기를 설정하거나 광고를 수동으로 로드할 수 있도록 AutoRefresh를 비활성화할 수 있습니다. 수동 로드와 자동 새로고침 모두 2개의 연속적인 광고 로드 사이의 최소 주기는 20초입니다.

  3. UIViewControllerdealloc 메소드에서 델리게이트를 nil로 설정합니다. 또는 배너를 릴리즈할 때 언제든지 설정할 수 있습니다.

    -(void)dealloc {
    self.banner.delegate = nil;
    }
    
    
  4. 광고 상태 콜백의 경우, IMBanner의 델리게이트 속성을 구현합니다. 다음

    콜백이 지원됩니다.
    /*Indicates that the banner has received an ad. */
    - (void)bannerDidFinishLoading:(IMBanner *)banner {
        NSLog(@"bannerDidFinishLoading");
    }
    /* Indicates that the banner has failed to receive an ad */
    - (void)banner:(IMBanner *)banner didFailToLoadWithError:(IMRequestStatus *)error {
        NSLog(@"banner failed to load ad");
        NSLog(@"Error : %@", error.description);
    }
     /* Indicates that the banner is going to present a screen. */
    - (void)bannerWillPresentScreen:(IMBanner *)banner {
        NSLog(@"bannerWillPresentScreen");
    }
    /* Indicates that the banner has presented a screen. */
    - (void)bannerDidPresentScreen:(IMBanner *)banner {
        NSLog(@"bannerDidPresentScreen");
    }
    /* Indicates that the banner is going to dismiss the presented screen. */
    - (void)bannerWillDismissScreen:(IMBanner *)banner {
        NSLog(@"bannerWillDismissScreen");
    }
    /* Indicates that the banner has dismissed a screen. */
    - (void)bannerDidDismissScreen:(IMBanner *)banner {
        NSLog(@"bannerDidDismissScreen");
    }
    /* Indicates that the user will leave the app. */
    - (void)userWillLeaveApplicationFromBanner:(IMBanner *)banner {
        NSLog(@"userWillLeaveApplicationFromBanner");
    }
    /*  Indicates that the banner was interacted with. */
    -(void)banner:(IMBanner *)banner didInteractWithParams:(NSDictionary *)params{
        NSLog(@"bannerdidInteractWithParams");
    }
    /*Indicates that the user has completed the action to be incentivised with .*/
    -(void)banner:(IMBanner*)banner rewardActionCompletedWithRewards:(NSDictionary*)rewards{
        NSLog(@"rewardActionCompletedWithRewards");
    }
    
    
  5. 배너 오브젝트를 새로고침하는 동안 다음 트랜지션을 사용할 수 있습니다.
    • UIViewAnimationTransitionNone
    • UIViewAnimationTransitionFlipFromLeft
    • UIViewAnimationTransitionFlipFromRight
    • UIViewAnimationTransitionCurlUp
    • UIViewAnimationTransitionCurlDown

     

    self.banner.transitionAnimation = UIViewAnimationTransitionCurlUp;
    
    

b. 인터페이스 빌더를 통한 배너 인스턴스 생성

  1. 광고를 표시할 위치에 있는 ViewController’s 뷰에 UIView를 위치시킵니다.
  2. 배너 프레임을 설정합니다.
  3. UIView의 클래스 아이덴티티를 IMBanner로 설정합니다.
  4. ViewController 헤더 파일에서 IMBannerIBOutlet 인스턴스를 선언합니다.
  5. 이를 스토리보드의 ViewController 씬에 있는 UIView(Banner)의 아웃렛으로 설정합니다.

CreativeID 검색 중

진행되고 있는 모든 광고 품질 검사를 피해나와, 관련성이없고 불쾌한 소재 또는 사용자에게 혼란을주는 광고를 보여줌으로써 앱의 사용자 경험을 손상시키는 불량 광고주가 가끔 있습니다. 이러한 상황을 극복하기 위해 광고 인스턴스의 creativeID를 검색하고 InMobi 담당자에게 암호화 된 creativeID를보고 할 수 있습니다.

mBannerAd.creativeId // mBannerAd는 예제 인스턴스입니다.

통합 테스트

  1. InMobi 포털에서 테스트 모드를 설정합니다.

    Tools - Diagnostics로 이동하여 Test Mode를 Global ON 또는 Selective ON으로 설정합니다.

    광고를 처음으로 연동하려는 경우 Test ModeGlobal ON으로 설정합니다.
    특정 디바이스에 선택적으로 테스트 트래픽을 활성화하려는 경우

    이미 이 광고에 이전 버전의 SDK를 연동한 적이 있으므로 몇 개의 디바이스에 테스팅을 제한해야 하는 경우
    Test ModeSelective ON으로 설정합니다.

    디바이스 섹션에서:

    1. Device ID 상자에 디바이스 ID를 입력합니다.
    2. Device Name 상자에서 이름을 설정합니다.
    3. Add Device를 클릭하여 테스트 디바이스를 추가합니다.

    이미 구성된 디바이스가 있는 경우, 해당 디바이스를 선택하면 테스트 모드가 활성화됩니다.

    참고: 앱을 정식으로 출시하기 전에 반드시 테스트 모드를 비활성화하십시오. 비활성화하지 않으면 앱을 수익화할 수 없습니다.

    이제 테스트 광고를 확인 하실 수 있습니다.

    디바이스 ID 확인

    디바이스 ID는 기본적으로 IDFA 또는 IFA(Identifier for Advertising)입니다. 디바이스 ID를 확인하는 가장 간편한 방법은 SDK 로그 수준을 “디버그”로 설정하는 것입니다. 디버그 로그를 활성화하려면 아래와 같이 이를 AppDelegate.m 파일 내의 didFinishLaunchingWithOptions 메소드에 추가하십시오.

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {    
    	//Initialize InMobi SDK with your account ID
    [IMSdk initWithAccountID:@"Insert InMobi account ID here"];
    //Set log level to Debug
    [IMSdk setLogLevel:kIMSDKLogLevelDebug]; 
    	// Do your stuff.
    	return YES;
    }
    
    


    디버그 모드에서 디바이스 ID는 다음과 같이 XCode 개발자 콘솔에 로깅됩니다. “퍼블리셔 디바이스 ID는 <디바이스-ID>입니다.”

    해당 디바이스 ID를 Device ID 상자에 입력하면 XCode 개발자 콘솔에서 확인이 가능합니다.

  2. Diagnostics 탭에서 광고 및 광고 요청에 대한 피드백을 확인할 수도 있으며, 이는 특히 연동 과정에서 유용하게 활용할 수 있습니다.
  3. 배너 광고를 성공적으로 불러왔을 때 다음과 같은 주요 InMobi SDK 로그를 콘솔에서 확인할 수 있습니다.

    [InMobi] 계정 ID: <계정 ID 표시>로 InMobi SDK 초기화됨 <your account="" here="" id="" />

    [InMobi] 배치 ID: <배치 ID 표시>의 배너 광고 가져오는 중 <your here="" id="" placement="" />

    [InMobi] 퍼블리셔 디바이스 ID는 <디바이스 ID 표시> <device here="" id="" />

    [InMobi] 배치 ID <배치 ID 표시>의 배너 광고를 가져옴 <your here="" id="" placement="" />

  4. 이제 InMobi 테스트 광고를 앱에서 확인할 수 있습니다.
  5. 광고를 생성하기 전에 SDK가 올바르게 초기화되지 않을 경우, 일반적으로 다음 로그가 표시됩니다.

    ** 오류 ** [InMobi] ___ SDK를 초기화한 후 <광고 형식> <ad format="" /> 광고를 생성하십시오.

    ** 오류 ** [InMobi] ___ 계정 ID는 null 또는 빈 값일 수 없습니다. 올바른 계정 ID를 입력하십시오.

    [InMobi] 잘못된 계정 ID가 init에 전달되었습니다. 올바른 계정 ID를 입력하십시오.

모든 주요 로그는 다음 표에서 확인할 수 있습니다.

SDK 초기화

시나리오 로그 수준 로그
Publisher passed null or empty account id (퍼블리셔가 null 또는 빈 계정 ID를 전달함) 오류 Account id cannot be null or empty. Please provide a valid Account id.
Publisher passed a valid account id (퍼블리셔가 올바른 계정 ID를 전달함) 디버그 InMobi SDK initialized with account id: <account id="" />
Publisher passed an invalid account Id (퍼블리셔가 잘못된 계정 ID를 전달함) 오류 Invalid account id passed to init. Please provide a valid account id.
Newer version of SDK is available (SDK 버전이 업데이트됨) 디버그 A newer version (ver. 6.0.0) of the InMobi SDK is available! You are currently on an older version (ver. 5.3.1). Download the latest InMobi SDK from http://www.inmobi.com/products/sdk/#downloads

광고 공통

시나리오 로그 수준 로그
Ad requested when no network available (네트워크를 사용할 수 없을 때 광고 요청됨) 오류 Network not reachable currently. Please try again.
Ad requested when ad state is loading or available (광고 상태를 불러오는 중이거나 사용할 수 있을 때 광고 요청됨) 오류 An ad load is already in progress. Please wait for the load to complete before requesting for another ad (Placement id :<placement id="" />).
Ad requested when ad is viewed by user (사용자가 광고를 시청 중일 때 광고 요청됨) 오류 An ad is currently being viewed by the user. Please wait for the user to close the ad before requesting for another ad (Placement id : <placement id="" />).
Publisher device Id (퍼블리셔 디바이스 ID) 디버그 Publisher device id is <device id="" />

배너 광고

시나리오 로그 수준 로그
Publisher created a banner without initializing the SDK (퍼블리셔가 SDK를 초기화하지 않고 배너 광고를 생성함) 오류 Please initialize the SDK before creating a Banner ad
Publisher created a banner with an invalid/null placement id (퍼블리셔가 잘못된/null 배치 ID로 배너 광고를 생성함) 오류 Please provide a valid placement id to create a Banner ad
Publisher called load on a banner from IB/xml with improper placement id (퍼블리셔가 배치 ID가 부적절한 IB/xml 배너 광고에 로드를 호출함) 오류 Please provide a valid placement id to create a Banner ad
Publisher called load on a banner (퍼블리셔가 배너 광고에 로드를 호출함) 디버그 Fetching a Banner ad for placement id: <placement id="" />
Successfully fetched ad (광고를 가져옴) 디버그 Banner ad successfully fetched for placement id: <placement id="" />
Failed to fetch the ad (광고를 가져오지 못함) 디버그 Failed to fetch Banner ad for placement id:<placement id="" /> with error: <status code="" message="" />
Started loading the banner in a webview (배너 광고를 웹뷰로 불러오기 시작함) 디버그 Started loading Banner ad markup in the webview for placement id: <placement id="" />
Banner successfully loaded in the webview (배너 광고를 웹뷰로 불러옴) 디버그 Successfully loaded Banner ad markup in the webview for placement id: <placement id="" />
Failed to load banner in the webview (배너 광고를 웹뷰로 불러오지 못함) 디버그 Failed to load the Banner markup in the webview for placement id: <placement id="" />
Banner refresh is initiated (배너 광고 새로고침이 초기화됨) 디버그 Initiating Banner refresh for placement id: <placement id="" />

이 페이지가 도움이 되었나요?

이 페이지에서

마지막 업데이트 날짜: 17 Sep, 2020