My goal is to get ACCOUNT_PERFORMANCE_REPORT with custom date range.

I've tried

oauth2_client = GoogleRefreshTokenClient(self.client_id, self.client_secret, refresh_token) adwords_client = AdWordsClient(developer_token, oauth2_client, self.user_agent) report_downloader = client.GetReportDownloader(version='v201809') report={   'reportName': 'Google xxx ACCOUNT_PERFORMANCE_REPORT',    'dateRangeType': 'CUSTOM_DATE',    'reportType': 'ACCOUNT_PERFORMANCE_REPORT',    'downloadFormat': 'CSV',    'selector':    {      'fields': ['CustomerDescriptiveName', 'Date', 'Cost'],       'dateRange': '20200501,20201031'   } } 

And got

Request Summary:  { 'clientCustomerId': 'None',  'includeZeroImpressions': 'True',  'server': 'adwords.google.com',  'skipColumnHeader': 'False',  'skipReportHeader': 'False',  'skipReportSummary': 'False',  'isError': True,  'errorMessage': '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><reportDownload Error><ApiError><type>ReportDownloadError.INVALID_REPORT_DEFINITION_XML</type><trigger>Invalid ReportDefinition Xml: DateError.INVALID_STRING_DATE @ </t rigger><fieldPath></fieldPath></ApiError></reportDownloadError>' } 

but when i use

 report= {   'reportName': 'Google xxx ACCOUNT_PERFORMANCE_REPORT',    'dateRangeType': 'LAST_7_DAYS',    'reportType': 'ACCOUNT_PERFORMANCE_REPORT',    'downloadFormat': 'CSV',    'selector':    {      'fields': ['CustomerDescriptiveName', 'Date', 'Cost']   } } 

it's ok

The question is: How to specify custom dateRange range in selector properly?

I am trying to pull report from google ad manager using API

  report_job = {   'reportQuery': {       'dimensions': ['AD_EXCHANGE_DATE', 'AD_EXCHANGE_COUNTRY_NAME'],       'columns': ['AD_EXCHANGE_AD_REQUESTS', 'AD_EXCHANGE_IMPRESSIONS',                   'AD_EXCHANGE_ESTIMATED_REVENUE','AD_EXCHANGE_AD_ECPM'],       'dateRangeType': 'LAST_WEEK',       'timeZoneType': 'AD_EXCHANGE',  # Run in pacific time       'adxReportCurrency': 'USD'   }   }

I suspect the downloaded report has very wired ECPM and Revenue values. as below

Please help if i am doing something wrong, as the ECPM has to be very low and the revenue as well.

I need some help with the google ad manager API. I am trying to delete a lineitem with the following:

from googleads import ad_manager client = ad_manager.AdManagerClient.LoadFromStorage() def test(id):     line_item_service = client.GetService('LineItemService',version='v202002')     line_item_name = str(id)     statement = (ad_manager.StatementBuilder(version='v202002').Where('OrderId = :OrderId').WithBindVariable('OrderId',app.config['AD_MANAGER']['ORDER_ID']))         response = line_item_service.performLineItemAction(line_item_service.DeleteLineItems(),statement.ToStatement()) 

My problem lies with DeleteLineItems() as I am not sure how to call it correctly. I am not able to find clear usage examples, hence my attempt above. Below are the docs I could find. The error of my current attempt is:

{success: false, error: "<class 'googleads.errors.GoogleAdsValueError'>", message: "Service DeleteLineItems not found"} 

https://developers.google.com/ad-manager/api/reference/v202011/LineItemService.DeleteLineItems https://developers.google.com/ad-manager/api/reference/v202011/LineItemService#performLineItemAction

I need to fetch:

  1. Name of the campaign.
  2. Impressions.
  3. Cost.
  4. Conversation Rate.
  5. Conversions.
  6. Date.
  7. Budget.
  8. Image/Video of this ad.

Can I fetch it all from campaign entity? How?

$googleAdsServiceClient = $googleAdsClient->getGoogleAdsServiceClient(); // Creates a query that retrieves all campaigns. $query = 'SELECT [MYLIST]  FROM campaign ORDER BY campaign.name'; // Issues a search stream request. /** @var GoogleAdsServerStreamDecorator $stream */ $stream = $googleAdsServiceClient->searchStream($customerId, $query); // Iterates over all rows in all messages and prints the requested field values for // the campaign in each row. foreach ($stream->iterateAllElements() as $googleAdsRow) {     /** @var GoogleAdsRow $googleAdsRow */     printf(         "Campaign with ID %d and name '%s' was found.%s",         $googleAdsRow->getCampaign()->getId(),         $googleAdsRow->getCampaign()->getName(),         AND SOMETHING HERE         PHP_EOL     ); } 

I want to get Device Targeting Information from Google Ads Api as show in below screen shot:

Currently from what i get from the documentation i am doing this :

string  query = $@"SELECT campaign_criterion.device.type FROM campaign_criterion";       // also tried this query query = $@"SELECT campaign.id, campaign_criterion.device. FROM Device WHERE campaign.id =           {campaignId}";            PagedEnumerable<SearchGoogleAdsResponse, GoogleAdsRow> result =               googleAdsService.Search(customerId.ToString(), query);            foreach (GoogleAdsRow criterionRow in result)             {                 DeviceInfo device = criterionRow.CampaignCriterion.Device;             } 

I have randomly tried many other but i always see NULL in Device i have been able to successfully get Keywords , Ad Schedule View and works fine but cannot seem to get this working any help is appreciated.