This is the script I have written in adword script writer but this script not give any row in the query, But when i was running report for campaign performance then it will give data.
this script not giving me any row in query
function main(){
var report = AdWordsApp.report("Select CampaignName,Clicks,Impressions,Cost From CAMPAIGN_PERFORMANCE_REPORT DURING LAST_7_DAYS");
var rows = report.rows();
while (rows.hasNext()) {
var row = rows.next();
var campaignName = row['CampaignName'];
var clicks = row['Clicks'];
var impressions = row['Impressions'];
var cost = row['Cost'];
Logger.log(campaignName + ',' + clicks + ',' + impressions + ',' + cost);
}
}
So please give me hint or script how I can get same data for campaign performance report in my script.