Posts tagged with google-ad-manager

Google has the following docs for the ad manager here. Unfortunately their example:

# Set the start and end dates of the report to run (past 8 days). end_date = date.today() start_date = end_date - timedelta(days=8) # Create report job. report_job = {     'reportQuery': {         'dimensions': ['LINE_ITEM_ID', 'LINE_ITEM_NAME'],         'columns': ['AD_SERVER_IMPRESSIONS', 'AD_SERVER_CLICKS',                     'AD_SERVER_CTR', 'AD_SERVER_CPM_AND_CPC_REVENUE',                     'AD_SERVER_WITHOUT_CPD_AVERAGE_ECPM'],         'dateRangeType': 'CUSTOM_DATE',         'startDate': start_date,         'endDate': end_date     } } # Initialize a DataDownloader. report_downloader = client.GetDataDownloader(version='v202008') try:   # Run the report and wait for it to finish.   report_job_id = report_downloader.WaitForReport(report_job) except errors.AdManagerReportError as e:   print('Failed to generate report. Error was: %s' % e) with tempfile.NamedTemporaryFile(     suffix='.csv.gz', mode='wb', delete=False) as report_file:   # Download report data.   report_downloader.DownloadReportToFile(       report_job_id, 'CSV_DUMP', report_file) 

yields a KeyError: 'date' on the report_job_id line. My authorization is correct and I can make other calls with my client. My question is, how does one need to update report_job in order for the example to work. I tried changing 'dateRangeType' however this states it must be 'CUSTOM_DATE'.

I am new to Google Adwords. I have completed all initial configuration and integration required to use Adwords API. I have a test client account and I am able to get campaigns from that account. I also completed uploading offline data integration.

 // Upload offline data on the server and print some information.     OfflineDataUploadReturnValue returnValue =         offlineDataUploadService.mutate(operations.toArray(new OfflineDataUploadOperation[0]));     offlineDataUpload = returnValue.getValue(0);     System.out.printf(     "Uploaded offline data with external upload ID %d, and upload status %s.%n",     offlineDataUpload.getExternalUploadId(), offlineDataUpload.getUploadStatus()); 

But when I run the code to upload the data, I am facing below error:-

Request failed due to ApiException. Underlying ApiErrors:   Error 0: NotWhitelistedError{apiErrorType=NotWhitelistedError, errorString=NotWhitelistedError.CUSTOMER_NOT_WHITELISTED_FOR_API, fieldPath=, reason=CUSTOMER_NOT_WHITELISTED_FOR_API, trigger=} 

As I said earlier I am new to the Google AdWords, so any suggestion and help will be gladly appreciated. Thank you in advance!

THE SITUATION:

In my Vue app I need to show ads using the Google IMA sdk.
However it seems that the AdDisplayContainer it's stuck in an endless update loop.

JSFIDDLE:

I have recreated the issue on JsFiddle with a bare minimum example. You can check the error in the console.

https://jsfiddle.net/fraMussi/53f6vbjh/7/

As you can see there isn't much going on:

  • I import the google IMA sdk
  • I have basic markup for the video and ad container
  • I setup the adDisplayContainer
  • I have added a watcher to detect the issue

THE CODE:

this.adDisplayContainer = new google.ima.AdDisplayContainer(         this.$refs.adContainer, this.videoContent); 

THE ERROR:

It seems that it adDisplayContainer gets updated in a loop:

Error in nextTick: "RangeError: Maximum call stack size exceeded" <br> RangeError: Maximum call stack size exceeded 

In a production-like environment I get a similar error message:

InternalError: too much recursion 

THE QUESTION:

Do you know why is this happening and how to fix it?

Tasked with writing a client to interact with Google Ad Manager. From what I can tell there are three "official" python client libraries on PyPi released by Google. One seems to be legacy, as indicated in its README, but the other two seem to be actively developed.

https://github.com/googleapis/google-api-python-client (Legacy, first release = 2011)

https://github.com/googleads/googleads-python-lib (first release = 2014)

https://github.com/googleads/google-ads-python (first release = 2018)

The latter two have the same three developers. Which to use?

I'm trying to get access to Display Ad images via the Google Ads API. At the moment, my code doesn't seem to be working for certain ads. As near as I can tell from my debugging efforts so far, the issue is that it's not working for HTML5 ads.

Here is the query I'm using :

SELECT      ad_group.name,      campaign.name,      ad_group_ad.ad.responsive_display_ad.logo_images,      ad_group_ad.ad.responsive_display_ad.marketing_images,      ad_group_ad.ad.image_ad.preview_image_url,      ad_group_ad.ad.image_ad.image_url FROM     ad_group_ad WHERE     campaign.advertising_channel_type = \'DISPLAY\' LIMIT     100 

For accounts using HTML5 ads, there is nothing returned for any of the last (4) fields. For other accounts, I'm using the "ad_group_ad.ad.image_ad.image_url" field to get the ad image.

What am I missing?