I'm trying to block an IP list through Google API v2 but I'm getting the error "Criteria type can not be targeted." on field: operations, on field: create, on field: ip_block. Another doubt that I have, is if I will need to repeat the create operation for each IP on my list or there is a way to put multiple Ip on the same request.

client = (google.ads.google_ads.client.GoogleAdsClient.load_from_storage(path="./google-ads.yaml")) campaign_criterion_operation = client.get_type('CampaignCriterionOperation', version='v2') campaign_criterion = campaign_criterion_operation.create campaign_criterion.campaign.value = campaign_service.campaign_path(customer, campaign) campaign_criterion.ip_block.ip_address.value = "xxx.xxx.xxx.xxx" campaign_criterion_response = campaign_criterion_service.mutate_campaign_criteria(customer, [campaign_criterion_operation]) for reponse in campaign_criterion_response.results:     print('Added campaign criterion "%s".' % reponse.resource_name) 

Let me start by saying I am not a developer, so please forgive my ignorance here. :)

For the attached script, I am receiving the error: Parsing error. Please check your selector. (line 103)

For the life of me, I can't figure out how to fix this and I've done an extensive online search.

For reference, here is where the script came from: https://searchengineland.com/script-automates-adding-adwords-data-google-spreadsheet-277724

Any solutions would be much appreciated!

(Note that the personal info in the lines 17-21 have been filled out correctly.)

Thanks,

    // AdWords Script: Put Data From AdWords Report In Google Sheets // -------------------------------------------------------------- // Copyright 2017 Optmyzr Inc., All Rights Reserved // // This script takes a Google spreadsheet as input. Based on the column headers, data filters, and date range specified // on this sheet, it will generate different reports. // // The goal is to let users create custom automatic reports with AdWords data that they can then include in an automated reporting // tool like the one offered by Optmyzr. // // // For more PPC management tools, visit www.optmyzr.com // */ var DEBUG = 0; // set to 1 to get more details about what the script does while it runs; default = 0 var REPORT_SHEET_NAME = "report"; // the name of the tab where the report data should go var SETTINGS_SHEET_NAME = "settings"; // the name of the tab where the filters and date range are specified var SPREADSHEET_URL = "https://docs.google.com/spreadsheets/d/1dttJTb547L81XYKdTQ56LcfO9hHhbb9wm06ZY5mKhEo/edit#gid=0"; // The URL to the Google spreadsheet with your report template var EMAIL_ADDRESSES = "exa...@example.com"; // Get notified by email at this address when a new report is ready function main() {   var currentSetting = new Object();   currentSetting.ss = SPREADSHEET_URL;   // Read Settings Sheet   var settingsSheet = SpreadsheetApp.openByUrl(currentSetting.ss).getSheetByName(SETTINGS_SHEET_NAME);   var rows = settingsSheet.getDataRange();   var numRows = rows.getNumRows();   var numCols = rows.getNumColumns();   var values = rows.getValues();   var numSettingsRows = numRows - 1;   var sortString = "";   var filters = new Array();   for(var i = 0; i < numRows; i++) {     var row = values[i];     var settingName = row[0];     var settingOperator = row[1];     var settingValue = row[2];     var dataType = row[3];     debug(settingName + " " + settingOperator + " " + settingValue);     if(settingName.toLowerCase().indexOf("report type") != -1) {       var reportType = settingValue;     } else if(settingName.toLowerCase().indexOf("date range") != -1) {       var dateRange = settingValue;     } else if(settingName.toLowerCase().indexOf("sort order") != -1) {       var sortDirection = dataType || "DESC";       if(settingValue) var sortString = "ORDER BY " + settingValue + " " + sortDirection;       var sortColumnIndex = 1;     }else {       if(settingOperator && settingValue) {         if(dataType.toLowerCase().indexOf("long") != -1 || dataType.toLowerCase().indexOf("double") != -1 || dataType.toLowerCase().indexOf("money") != -1 || dataType.toLowerCase().indexOf("integer") != -1) {           var filter =  settingName + " " + settingOperator + " " + settingValue;         } else {           if(settingValue.indexOf("'") != -1) {             var filter =  settingName + " " + settingOperator + ' "' + settingValue + '"';           } else if(settingValue.indexOf("'") != -1) {             var filter =  settingName + " " + settingOperator + " '" + settingValue + "'";           } else {             var filter =  settingName + " " + settingOperator + " '" + settingValue + "'";           }         }         debug("filter: " + filter)         filters.push(filter);       }     }   }   // Process the report sheet and fill in the data   var reportSheet = SpreadsheetApp.openByUrl(currentSetting.ss).getSheetByName(REPORT_SHEET_NAME);   var rows = reportSheet.getDataRange();   var numRows = rows.getNumRows();   var numCols = rows.getNumColumns();   var values = rows.getValues();   var numSettingsRows = numRows - 1;   // Read Header Row and match names to settings   var headerNames = new Array();   var row = values[0];   for(var i = 0; i < numCols; i++) {     var value = row[i];     headerNames.push(value);     //debug(value);   }    if(reportType.toLowerCase().indexOf("performance") != -1) {     var dateString = ' DURING ' + dateRange;   } else {     var dateString = "";   }   if(filters.length) {     var query = 'SELECT ' + headerNames.join(",") + ' FROM ' + reportType + ' WHERE ' + filters.join(" AND ") + dateString + " " + sortString;   } else {     var query = 'SELECT ' + headerNames.join(",") + ' FROM ' + reportType + dateString + " " + sortString;   }   debug(query);   var report = AdWordsApp.report(query);   try {     report.exportToSheet(reportSheet);     var subject = "Your " + reportType + " for " + dateRange + " for " + AdWordsApp.currentAccount().getName() + " is ready";     var body = "currentSetting.ss<br>You can now add this data to <a href='https://www.optmyzr.com'>Optmyzr</a> or another reporting system.";     MailApp.sendEmail(EMAIL_ADDRESSES, subject, body);     Logger.log("Your report is ready at " + currentSetting.ss);     Logger.log("You can include this in your scheduled Optmyzr reports or another reporting tool.");   } catch (e) {     debug("error: " + e);   } } function debug(text) {   if(DEBUG) Logger.log(text); } 

I have a set of keywords for an idea, I have put those keywords to the Google planner and i get search volume in ranges but I want exact search volumes for those keywords like ubersuggest is giving us. I wonder how an individual can achieve this?

I have python script to download the google ad historical report through the API. I am having below as report job

{       'reportQuery': {           'dimensions': [                          'DATE',                          'MOBILE_APP_NAME',                          'ADVERTISER_NAME',                          'ADVERTISER_ID',                          'AD_UNIT_ID',                          'AD_UNIT_NAME',                          'LINE_ITEM_NAME',                          'LINE_ITEM_ID',                          'LINE_ITEM_TYPE',                          'CREATIVE_TYPE',                          'CREATIVE_NAME',                          'CREATIVE_ID',                          'MOBILE_DEVICE_NAME'                          'PLACEMENT_NAME',                          'PLACEMENT_ID'                          ],           'dimensionAttributes': [                                   'AD_UNIT_CODE',                                   'LINE_ITEM_PRIORITY'                                   'CREATIVE_CLICK_THROUGH_URL'                                     'ADVERTISER_EXTERNAL_ID'                                   ],           'columns': [                      'AD_SERVER_IMPRESSIONS',                      'AD_SERVER_CLICKS',                       'AD_SERVER_CTR',                       'AD_EXCHANGE_IMPRESSIONS',                       'AD_SERVER_CPM_AND_CPC_REVENUE',                       'AD_SERVER_WITHOUT_CPD_AVERAGE_ECPM'           ],           'dateRangeType': 'CUSTOM_DATE',           'startDate': start_date,           'endDate': end_date       }   } 

I am getting below error

Failed to generate report. Error was: [ReportError.COLUMNS_NOT_SUPPORTED_FOR_REQUESTED_DIMENSIONS @ columns; trigger:'AD_EXCHANGE_IMPRESSIONS' 

I am not sure which dimension need to include for AD_EXCHANGE_IMPRESSIONS. When I generate report with same fields in UI it works fine without errors

My Apps gets crash with following Crashlytics console description:

Fatal Exception: UIApplicationInvalidInterfaceOrientation

Supported orientations has no common orientation with the application, and [GADFullScreenAdViewController shouldAutorotate] is returning YES

App supports all orientations except when a user switches player in fullscreen mode. I use a method in AppDelegate to manage supported orientations:

var supportedOrientation = UIInterfaceOrientationMask.all func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {    return self.supportedOrientation }