Questions tagged [adsense-api]

AdSense Management API and AdSense Host API related questions.

Filter by
Sorted by
Tagged with
11 votes
5 answers
6k views

How to programmatically collapse space in empty div when google ad does not show

Is there any way to programmatically collapse the empty space that results when a google ad does not show? If so, I would love to see an illustrative example of the same. Searching around has led me ...
  • 14.7k
8 votes
1 answer
2k views

Cannot Add the AdSense API in API Manager

I'm trying to follow the AdSense API getting started guide, and I'm getting stuck on the 'Register your application' section. I have created a project, but I can't find the 'Activate' button. Instead ...
  • 649
7 votes
2 answers
19k views

Google adsense responding the server responded with a status of 400 ()

I'm implementing google adsense first time on my website myPleaks . Here I'm facing below mentioned error:- Failed to load resource: the server responded with a status of 400 () https://googleads.g....
  • 1,039
6 votes
2 answers
292 views

How to customize ads tracking of Adsense?

I know my question is relevant to Custom click tracking for adsense but I am here asking it again because I need more answers of above mentioned question. only one answer already there, But it is not ...
user avatar
6 votes
2 answers
634 views

How to configure firebase for consent and data compliance on web?

I'm currently working on a consent management system for my platform where we use firebase for analytics and AdSense for Ads. However the api is badly documented on this subject and there doesn't seem ...
6 votes
3 answers
752 views

Is there any way to pull earning from a specific page by adsense?

I am trying to find out a way to get revenue generated by a page of my website. For example my website have 10 pages(a,b,c,....) and they all have ads placed on them. I need to calculate revenue ...
6 votes
1 answer
1k views

AdSense management API testing with test account

I am developing a mobile application that uses AdSense management API. I am able to test it with my personal Google account linked with AdSense. However for certification purposes I need to provide a ...
  • 73
5 votes
4 answers
2k views

error enabling adsense management api

I am trying to enable the adsense management api from the google developers console. I have created a project and under APIs and auth I go to APIs and try to turn on AdSense Management API, but when I ...
5 votes
1 answer
2k views

GoogleWebAuthorizationBroker.AuthorizeAsync works locally but hangs on production IIS

I have a report application that uses the adsense api. I am using GoogleWebAuthorizationBroker.AuthorizeAsync for authentication. When i wun it locally it works fine, the request for permission window ...
5 votes
0 answers
184 views

What exactly does the automaticDataCollectionEnabled flag do in Firebase web?

Currently working on a CMF for a web platform that uses firebase, Firebase Analytics and AdSense. However firebase's docs on consent and user privacy for the web are either missing a lot of stuff or ...
4 votes
1 answer
979 views

Google IMA SDK Overlay & Fullslot Ad Reference for JavaScript

I'm already using the Google IMA HTML5 SDK API for displaying a fullslot ad in our self-made player. Now, I'm trying to add an overlay ad within the same API, but I can't find the documentation for ...
4 votes
0 answers
443 views

Using the Adsense management API how do I get the exact URL in which each ad was shown when I generate a report?

What I need to do: I want to generate adsense reports programmatically to get the earnings and the page views for each ad in my website that lets users post their own articles, so I need to know from ...
3 votes
2 answers
2k views

Hide Google Adsense banner when there's no advertisments on Website

I have some problems when trying to integrate Google Adsense to my Weather Website. The google banner is running but not well. Sometimes, it doesn't show anything except for a blank banner. Like in ...
  • 41
3 votes
1 answer
455 views

Accessing Google Adsense API from a server with Python?

Is there any way to use Python to access the Google Adsense API from a server without any user interaction? This is typically done by setting up a "service account", but Google's docs say ...
  • 59.5k
3 votes
0 answers
1k views

Displaying Adsense Ads in Chrome Extension

I'm Trying to Monetize a Google Chrome Extension, The Extension has a large panel that display content to the users. I want to add Small Sized Advertisement from Google Adsense into the extension ...
  • 145
2 votes
4 answers
3k views

using Adsense API, How can I find which application an admob ad unit id belongs to?

Adsense api returns ad unit names associated with the ad unit id. But the names aren't unique like "on main page". These adunits are part of an application created using admob. Some applications have ...
2 votes
2 answers
11k views

Import from github to android studio

Hey I am trying to build an android application regarding google adsense. I want to import the android sample. https://github.com/Ishaan-Kumar/googleads-adsense-examples Since I am only interested in ...
2 votes
1 answer
122 views

Is there a way to track ads served from within API?

I have set up my Admob to serve ads to specific every 30 seconds within my cordova/ionic based App. Is there a way to capture when a new ad is sent or when an add rotates from the API? Or even a way ...
  • 2,653
2 votes
1 answer
390 views

Channel-wise Google adsense information

I am using adsense Management API and followed everything there to generate a demo report as it is described in the example on their site. The information I am currently fetching uses this ...
  • 1,242
2 votes
1 answer
635 views

Get the total earnings from a specific URL using the Adsense Management API

Is it possible to get the total all-time earnings of a specific URL (say, https://example.com/page/xyz) using the AdSense Management API? (preferably the PHP library). If so, please post a code answer ...
2 votes
1 answer
520 views

Query Google Adsense data by URL?

Is there any way to query data in the Google Adsense Python API by URL? For example, find the number of ad clicks on a specific page? I can find no direct method listed in the documentation. The only ...
  • 59.5k
2 votes
0 answers
124 views

get account sub-account tree empty

I want to get the sub-account tree under my current account by account id, get it according to the examples method, and respond to an empty object. In fact, the account has been bound to 7 sub ...
2 votes
1 answer
548 views

Accessing Campaigns report in AdMob using Adsense API

I use Adsense API to access my AdMob account and generate reports. This is the main API request that I use: https://www.googleapis.com/adsense/v1.4/accounts/accountId/reports Documentation The API ...
  • 5,956
2 votes
0 answers
366 views

Creating AdUnits in a publisher AdMob account using an API, just as Appodeal does

I've been looking at AdSense Host API, that lets you create ad units for a publisher's AdSense account. I want to be able to do this for the same publisher's AdMob account! The problem statement here ...
2 votes
1 answer
385 views

User rate limit (403 error) with Google AdSense API

When making requests to the Google AdSense API I reach the user rate limit. It occurs when three users (different gmail accounts) with access to the same AdSense account are making requests at the ...
  • 31
2 votes
1 answer
760 views

'Google AdSense API' PHP sample code is not working

Please, Help me.... I would like to use the Google AdSense API to get my Earnings through PHP. But sample code is not working. PUTTY - SSH connect Install 'Composer' php -r "if (hash_file('SHA384',...
2 votes
1 answer
1k views

"User does not have an AdSense account" message when using a service account to access the AdSense Management API

I really looked it up and found no suitable answer. I have both an AdSense and AdMob accounts sharing the same publisher ID. They're active and when I try the API in https://developers.google.com/...
2 votes
0 answers
579 views

Google Sign In and Google API Client Authorisation iOS Issue (401)

I am trying to use the Objective-C Google API Client with the Google Sign In service so that I can authorise my requests. I've setup my Google Sign In login view controller so that a user can login ...
  • 254
2 votes
2 answers
841 views

Developing with Google Adsense/DFP

I'm developing a web app that will use Google Adsense or DFP as a method of monetisation. I've tried searching for some reliable info but I can't find any. How do I run a development environment with ...
2 votes
2 answers
4k views

Connect to Google AdSense API via PHP

I'm trying to connect to AdSense API using a PHP script. I started using this tutorial by google: https://developers.google.com/api-client-library/php/start/get_started#build-the-client-object ...
  • 959
1 vote
1 answer
3k views

Adsense API live reporting

I want to integrate my Adsense Reporting into my own admin portal. My admin portal is a simple php based website with lists of other websites that I own. My goal is to fill this list of websites ...
  • 103
1 vote
1 answer
964 views

Google API: Customer is not an AdSense Host

What I'm trying to do? List and create AdSense ad units using Google API. What have I tried? Went to adunits.list on Google APIs Explorer. Inserted in my accountId and adClientId (pub-...
  • 3,146
1 vote
1 answer
6k views

Exception in queued GPT command TypeError: Cannot read property 'addService' of null

I am using adsesne code in my angularjs application. On the first load of application ads are working fine when I switch content dynamically I get this error. Exception in queued GPT command ...
  • 482
1 vote
1 answer
868 views

Is it possible to access the AdSense API using ruby?

I am trying to access the AdSense Management API using ruby. They recommend using their generic Google-API client library: http://code.google.com/p/google-api-ruby-client/#...
1 vote
1 answer
909 views

How to programmatically know if an Google AdSense ad is successfully displayed or if any error occured in my react/next.js website?

Our site let's user post content and we display ads on them and share some part of ad revenue with user just like YouTube. Now the issue is how to programmatically know if an ad was successfully ...
1 vote
1 answer
1k views

Can not access the Adsense Management API

Can not access the AdSense API no matter what I try. I have tried both service account and OAuth authentications. What I am trying to accomplish: Creating a bot that will grab the Adsense revenue ...
  • 2,402
1 vote
1 answer
147 views

Why AdSense web interface and API are reporting different numbers?

I've managed to get API working but it is reporting numbers which are always a bit lower than the ones reported by AdSense web (or mobile app) interface. This is the response from API explorer: "...
  • 21
1 vote
2 answers
650 views

I want to print admob report in my application

I have admob account and ad units are successfully placed in my application. now i want to print admob report in my application like User ABC has clicked '_' times in this application earning and RPM ...
1 vote
1 answer
3k views

Google ads iframe being blocked for home page

I am working on my local website page for google ads: fatehjangcity.com Ads are displayed on almost every page but problem occurs when we visit home/default/index page... When working on localhost:...
1 vote
1 answer
523 views

AdSense Management API - Missing required parameter: redirect_uri With Service Account

I am getting the following Error when trying to connect with the AdSense Management API Example: Missing required parameter: redirect_uri I am using a service Account, because my Server handles ...
user avatar
1 vote
1 answer
1k views

Google AdSense API Refresh Token not working

From here: Google AdSense API asking for log in each time I tried and this worked the first time, but the next day, the script ran and got an error: Uncaught exception 'Google_Auth_Exception' with ...
1 vote
1 answer
756 views

How to integrate google AdSense in NextJS project?

Integrate google AdSense in NextJS project? I tried several way which gives on internet blog but I was stuck each method. and I tried AdSense at dummy site but It couldn't work in my case Here I have ...
1 vote
0 answers
155 views

Prevent Adsense "No Content" tag on PHP page with AJAX request content

I'm trying to use Adsense on my PHP website's main page. The content of the page (video players) is inserted from an AJAX request after the index.php has been loaded. The main page sends an Ajax ...
  • 756
1 vote
0 answers
295 views

Adsense - We found that your site is down or unavailable

It's my first time to try adsense in a site I made from scratch I tried to add adsense to my website over 10 times and everytime it says: We found that your site is down or unavailable: And the code ...
  • 804
1 vote
1 answer
367 views

How to get the Mediation report from AdmobMediation using PHP SDK

I'm using google-api-php-client to get the AdmobMediation report remotely from our servers Every thing works fine, except that the response report is only related to the "Admob Network", not the "...
1 vote
0 answers
104 views

How to use AdSense API to show saved raports to website users?

It's been a long journey. I've researched all over the place. And it has been painful to find a solution. I intend to do something, supposedly, simple. I need to show reports saved in AdSense and ...
1 vote
0 answers
114 views

How can one access the "Active View Viewable" metric via the AdSense API

While the "Active View Viewable" metric is available in the AdSense UI, it appears that it has never been exposed to the AdSense Management API. Is it indeed possible to access this metric (perhaps ...
1 vote
0 answers
97 views

Google AdSense API explorer return all rows even when a maxResult as well

Have anyone else had a problem with Google AdSense API explorer returning all rows for a report even when MaxResult is set? It works for all other requests but not Accounts.reports.saved: generate. ...
  • 31
1 vote
0 answers
624 views

Google AdSense API not showing anything

I'm developing Google AdSense Management API in php, I'm new for it. I'm getting nothing after login, I'm trying to run Example sample code. but I'm getting this screen after login to my account! ...
  • 2,301
1 vote
0 answers
554 views

Google Adsense Pub-Id Placement to prevent trackers

My adsense account provided me with this piece of code: <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <script> (adsbygoogle = ...
  • 159