विज्ञापन लोड करने से जुड़ी गड़बड़ियां

प्लैटफ़ॉर्म चुनें: 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()