Posts tagged with adsense

Recently I have been trying to create a script to retrieve either an accounts or individual campaigns optimisation scores and subsequently send a email including this. My problem is that I cannot find optimisation score in stats or metrics anyway I try.

Does anyone know if this is even a retrievable variable in scripts?

I tried a lot of ways to enable the Vignette ads on the Next JS site before I realized that there always was a block for them in the inspector, it just never change "display: none" to "display: block".

<ins class="adsbygoogle adsbygoogle-noablate" style="display: none !important; width: 100vw !important; height: 100vh !important; inset: 0px auto auto 0px !important; clear: none !important; float: none !important; margin: 0px !important; max-height: none !important; max-width: none !important; opacity: 1 !important; overflow: visible !important; padding: 0px !important; position: fixed !important; vertical-align: baseline !important; visibility: visible !important; z-index: 2147483647 !important; background: transparent !important;" data-adsbygoogle-status="done" aria-hidden="true" data-vignette-loaded="true" data-ad-status="filled"></ins> 

How i saw on other sites this ins appear and after some interaction with the site display automatically changed from none to block and Vignette Ads appear. If I manually change in the inspector display to block - Vignette will appear immediately, but automatically never.

Please can anyone know a possible solution?

I want to update our code for the new Google Ads API but I cant find the API Center in Google Ads Dashboard with the main account.

When I open the url to API Center than came this message: Only administrative account users have access to the API Center. For more information, see the API login guide

Has anyone a idea or is there another way to get the Developer Token?

I have a problem implementing AdMob with my Android app, ads are not showing for my package name, I changed the name and everything works fine, I restored the prod name and everything stopped working with the error: no ad config, this is my first time using AdMob, which means the ads work for a while and then suddenly stop is not the case here, I don't suspect anything wrong with the code because I followed everything in the documentation and, as I said, everything works fine when I change the package name to a random string.

  1. Is app-ads.txt correct? yes, app-ads.txt file found and verified (100% of queries authorized)
  2. Policy center: no current issues, no disapproved apps
  3. App linked to admob? yes it is linked through google play and I noticed the icon is updated
  4. PIN verification: I still didn't reach the verification threshold
  5. Is Google Ads and Adsense linked to Admob? yes, and with the same email
  6. Admob status: Your account is approved
  7. App approval status: Ready (Ad serving enabled)
  8. App stores: Google Play
  9. Ad format: Rewarded
  10. Ads activity performance, Requests: 0 (ZERO)

Note 1: the email I am using on play console is diff from the email of admob / ads / adsense

Note 2: the prod app is already launched in google play store

Any help guys?

MainActivity.java:

package com.example.admob; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Toast; import com.google.android.gms.ads.AdRequest; import com.google.android.gms.ads.LoadAdError; import com.google.android.gms.ads.MobileAds; import com.google.android.gms.ads.OnUserEarnedRewardListener; import com.google.android.gms.ads.RequestConfiguration; import com.google.android.gms.ads.initialization.InitializationStatus; import com.google.android.gms.ads.initialization.OnInitializationCompleteListener; import com.google.android.gms.ads.rewarded.RewardItem; import com.google.android.gms.ads.rewarded.RewardedAd; import com.google.android.gms.ads.rewarded.RewardedAdLoadCallback; import java.util.Arrays; public class MainActivity extends AppCompatActivity {     private RewardedAd mRewardedAd;     @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);         /**/         RequestConfiguration configuration = new RequestConfiguration.Builder().setTestDeviceIds(Arrays.asList("PEO7WS709MHDMHS0KA74LQ4KDPL9V8DJ")).build();         /**/         MobileAds.setRequestConfiguration(configuration);         /**/         MobileAds.initialize(this, new OnInitializationCompleteListener() {             @Override             public void onInitializationComplete(InitializationStatus initializationStatus) {             }         });         AdRequest adRequest = new AdRequest.Builder().build();         RewardedAd.load(this, "ca-app-pub-2887021452579791/7518976046",                 adRequest, new RewardedAdLoadCallback() {                     @Override                     public void onAdFailedToLoad(@NonNull LoadAdError loadAdError) {                         // Handle the error.                         Log.d(TAG, loadAdError.getMessage());                         Toast.makeText(MainActivity.this, loadAdError.getMessage(), Toast.LENGTH_SHORT).show();                         mRewardedAd = null;                     }                     @Override                     public void onAdLoaded(@NonNull RewardedAd rewardedAd) {                         mRewardedAd = rewardedAd;                         Log.d(TAG, "Ad was loaded.");                         Toast.makeText(MainActivity.this, "Ad was loaded", Toast.LENGTH_SHORT).show();                     }                 });         findViewById(R.id.button).setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View view) {                 if (mRewardedAd != null) {                     Activity activityContext = MainActivity.this;                     mRewardedAd.show(activityContext, new OnUserEarnedRewardListener() {                         @Override                         public void onUserEarnedReward(@NonNull RewardItem rewardItem) {                             // Handle the reward.                             Log.d(TAG, "The user earned the reward.");                             Toast.makeText(MainActivity.this, "onUserEarnedReward", Toast.LENGTH_SHORT).show();                         }                     });                 } else {                     Log.d(TAG, "The rewarded ad wasn't ready yet.");                     Toast.makeText(MainActivity.this, "Not ready!", Toast.LENGTH_SHORT).show();                 }             }         });     } } 

Manifest.xml:

<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"     package="com.example.admob">     <application         android:allowBackup="true"         android:icon="@mipmap/ic_launcher"         android:label="@string/app_name"         android:roundIcon="@mipmap/ic_launcher_round"         android:supportsRtl="true"         android:theme="@style/Theme.AdMob">         <meta-data             android:name="com.google.android.gms.ads.APPLICATION_ID"             android:value="ca-app-pub-2887021452579791~7783129272"/>         <activity             android:name=".MainActivity"             android:exported="true">             <intent-filter>                 <action android:name="android.intent.action.MAIN" />                 <category android:name="android.intent.category.LAUNCHER" />             </intent-filter>         </activity>     </application> </manifest>