Skip to content Skip to sidebar Skip to footer

Admob Impressions/clicks Not Updating After Uploading It On Playstore

I had created a banner admob ad using this link. App it was working good. I even got publisher id and I was able to view impressions and clicks from Admob website. But after I comp

Solution 1:

Note: Ads can only be shown to the user, if they are available from the ad network.

  1. Do you have both these permissions defined?

    < uses-permission android:name="android.permission.INTERNET" />

    < uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

  2. Make sure the banner add unit is not a test.

  3. Add a listener to see if adds are being loaded:

    mAdView = (AdView) findViewById(R.id.adView);
    mAdView.setAdListener(newAdListener() {
        // Called when an ad is loaded.@OverridepublicvoidonAdLoaded() {
            Log.e(TAG, "Google onAdLoaded");
        }
    
        // Called when an ad failed to load.@OverridepublicvoidonAdFailedToLoad(int error) {
            String message = "Google onAdFailedToLoad: " + getErrorReason(error);
            Log.e(TAG, message);
        }
    
        // Called when an Activity is created in front of the app// (e.g. an interstitial is shown, or an ad is clicked and launches a new Activity).@OverridepublicvoidonAdOpened() {
            Log.e(TAG, "Google onAdOpened");
        }
    
        // Called when an ad is clicked and about to return to the application.@OverridepublicvoidonAdClosed() {
            Log.e(TAG, "Google onAdClosed");
        }
    
        // Called when an ad is clicked and going to start a new Activity that will leave the application// (e.g. breaking out to the Browser or Maps application).@OverridepublicvoidonAdLeftApplication() {
            Log.d(TAG, "Google onAdLeftApplication");
        }
    });
    AdRequest adRequest = newAdRequest.Builder().build();
    mAdView.loadAd(adRequest);
    

You also need this function:

privateStringgetErrorReason(int errorCode) {
    // Gets a string error reason from an error code.String errorReason = "";
    switch (errorCode) {
        caseAdRequest.ERROR_CODE_INTERNAL_ERROR:
            errorReason = "Internal error";
            break;
        caseAdRequest.ERROR_CODE_INVALID_REQUEST:
            errorReason = "Invalid request";
            break;
        caseAdRequest.ERROR_CODE_NETWORK_ERROR:
            errorReason = "Network Error";
            break;
        caseAdRequest.ERROR_CODE_NO_FILL:
            errorReason = "No fill";
            break;
    }
    return errorReason;
}

Post a Comment for "Admob Impressions/clicks Not Updating After Uploading It On Playstore"