I want to create a script that looks everyday for search impression share of each keyword, and raise bid if share is less than 0.7
for the first step I just wanted to log the details, but I got an error.
here is my current script:
function main() {
const TARGET_IMPRESSION_SHARE = 0.7;
const TOLERANCE = 0.05;
// How much to adjust the bids.
const BID_ADJUSTMENT_COEFFICIENT = 1.05;
var keywords= AdsApp.keywords()
.withCondition(`ad_group_criterion.status = ENABLED`)
.withCondition(`campaign.status = ENABLED`)
.withCondition(
`metrics.search_impression_share < ${TARGET_IMPRESSION_SHARE - TOLERANCE}`)
.orderBy(`metrics.search_impression_share ASC`)
.forDateRange(`YESTERDAY`)
.get().next();
var name = keywords.getText();
var query = 'SELECT SearchImpressionShare FROM ACCOUNT_PERFORMACE_REPORT WHERE KeywordText = "' + name + '" DURING YESTERDAY ' ;
var report = AdWordsApp.report(query);
var rows = report.rows();
while (rows.hasNext()) {
var row = rows.next();
var share = row["SearchImpressionShare"];
var stats = keywords.getStatsFor(YESTERDAY);
var imp = stats.getImpressions();
var clk = stats.getClicks();
Logger.log(name + " imp = " + imp + " click = " + clk + " share = " + share);
}
and this is my error:
InputError: Report not mapped: ACCOUNT_PERFORMACE_REPORT
at Ih (adsapp_compiled:1662:11)
at new lG (adsapp_compiled:16499:15)
at new CG (adsapp_compiled:16724:22)
at pH.report (adsapp_compiled:17386:12)
at qH.report (adsapp_compiled:17525:21)
at Object.<anonymous> (adsapp_compiled:18315:54)
}