My concern is that if Excluded Locations are blocked, and LocationType is the type of location that was used to deliver ads, there would be no LocationType data for Excluded Locations because the ad was never served to a user.
Am I misunderstanding still? Is there a qualifier I can add to the below report to pull data only for Exlcuded Locations. All of the rows getting pulled into the report have Impressions > 0, so I don't think the report is pulling data for Excluded Locations like I want it to. Thanks for your continued help!
function main() {
var accountIterator = MccApp.accounts()
.forDateRange("THIS_MONTH")
.orderBy("Clicks DESC").get();
var spreadsheet = SpreadsheetApp.openById("PASTE_SHEET_ID_HERE_JUST_ID_NOT_FULL_SHEET_URL");
var mccAccount = AdWordsApp.currentAccount();
var sheet = spreadsheet.getActiveSheet();
sheet.appendRow(['CampaignName', 'CustomerDescriptiveName', 'IsTargetingLocation', 'CountryCriteriaId', 'Customer ID', 'LocationType', 'Impressions', 'Clicks', 'Conversions', 'Cost']);
while (accountIterator.hasNext()) {
var account = accountIterator.next();
// Switch to the account you want to process.
var account_name = account.getName();
var account_name = account.getName() ? account.getName() : '--';
Logger.log(account_name);
MccApp.select(account);
var query = AdWordsApp.report(
"SELECT CampaignName, CustomerDescriptiveName, IsTargetingLocation, CountryCriteriaId, ExternalCustomerId, LocationType, Impressions, Clicks, Conversions, Cost FROM GEO_PERFORMANCE_REPORT " +
"WHERE IsTargetingLocation = FALSE " +
"DURING LAST_30_DAYS ");
var result = query.rows();
while (result.hasNext()) {
var row = result.next();
sheet.appendRow([row['CampaignName'], row['CustomerDescriptiveName'], row['IsTargetingLocation'], row['CountryCriteriaId'], row['ExternalCustomerId'], row['LocationType'], row['Impressions'], row['Clicks'], row['Conversions'], row['Cost']]);
}
}
}