# 플레이어블 광고 성공 사례

> Unity Ads UA를 사용하여 플레이어블 소재에 권장되는 성공 사례를 검토합니다.

플레이어블 에셋을 구성할 때 다음을 고려하십시오.

### mraid.open##mraid

클릭하는 사용자를 리디렉트하려면 게임의 앱 스토어 페이지 URL 문자열이 포함된 `mraid.open` 메서드를 사용하십시오.

```plaintext
case "Android":mraid.open("https://play.google.com/store/apps/details?id=yourgame"); break;

case "iOS":mraid.open("https://itunes.apple.com/us/yourgame?mt=8");
```

### Bootstrap##bootstrap

다음 예제에서 플레이어블 광고를 초기화하는 방법을 살펴보십시오.

```cs
// Wait for the SDK to become ready: 
function Start() {
    if (mraid.getState()==='loading') {
        // If the SDK is still loading, add a listener for the 'ready' event:
        mraid.addEventListener('ready', onSdkReady);
        // Otherwise, if the SDK is ready, execute your function:
    } else {
        onSdkReady(); 
    }
}

// Implement a function that shows the ad when it first renders:
function onSdkReady() {
    // The viewableChange event fires if the ad container's viewability status changes.
    // Add a listener for the viewabilityChange event, to handle pausing and resuming: 
    mraid.addEventListener('viewableChange',viewableChangeHandler);
	// The isViewable method returns whether the ad container is viewable on the screen.
    if (mraid.isViewable()) {
        // If the ad container is visible, play the ad:
        showMyAd(); 
    }
}

// Implement a function for executing the ad:
function showMyAd() {
    // Insert code for showing your playable ad. 
}

// Implement a function that handles pausing and resuming the ad based on visibility:
function viewableChangeHandler(viewable) {
    if(viewable) {
        // If the ad is viewable, show the ad:
        showMyAd(); 
    } else {
        // If not, pause the ad.
    }
}
```

> **Note:**
>
> * Unity Ads SDK에서 광고 건너뛰기 기능을 제어합니다.
> * 앱 스토어에 대한 자동 리디렉트 기능을 사용하지 않습니다. 광고를 통해 앱 스토어가 자동으로 열리지 않을 수 있으며 사용자가 처음 터치했을 때도 열리지 않을 수 있습니다.
> * 노출, 시청, 클릭 수 어트리뷰션은 서버 측에서 발생합니다.
