광고 로드 오류

플랫폼 선택: Android iOS Unity Flutter

광고가 로드되지 못하면 LoadAdError 객체를 제공하는 실패 콜백이 호출됩니다.

모든 광고 형식에서 광고 로드에 실패하면 다음 콜백이 호출됩니다.

public void OnAdFailedToLoad(object sender, AdFailedToLoadEventArgs args)

다음 코드 스니펫은 광고 로드에 실패할 때 오류 정보를 검색합니다.

public void OnAdFailedToLoad(object sender, AdFailedToLoadEventArgs args)
{
    LoadAdError loadAdError = args.LoadAdError;

    // Gets the domain from which the error came.
    string domain = loadAdError.GetDomain();

    // Gets the error code. See
    // https://developers.google.com/ad-manager/mobile-ads-sdk/android/reference/com/google/android/gms/ads/AdRequest
    // and https://developers.google.com/ad-manager/mobile-ads-sdk/ios/api/reference/Enums/GADErrorCode
    // for a list of possible codes.
    int code = loadAdError.GetCode();

   // Gets an error message.
   // For example "Account not approved yet". See
   // https://support.google.com/admob/answer/9905175 for explanations of
   // common errors.
   string message = loadAdError.GetMessage();

   // Gets the cause of the error, if available.
   AdError underlyingError = loadAdError.GetCause();

   // All of this information is available via the error's toString() method.
   Debug.Log("Load error string: " + loadAdError.ToString());

   // Get response information, which may include results of mediation requests.
   ResponseInfo responseInfo = loadAdError.GetResponseInfo();
   Debug.Log("Response info: " + responseInfo.ToString());
}

이 정보를 사용하여 광고를 로드하지 못한 원인을 보다 정확하게 파악할 수 있습니다. 특히, iOS의 경우 com.google.admob 도메인, Android의 경우 com.google.android.gms.ads 도메인에서 오류가 발생하면 이 고객센터 도움말에서 GetMessage() 코드를 검색하여 자세한 설명 및 문제 해결을 위해 취할 수 있는 조치에 대해 알아볼 수 있습니다.