function main() {
let report = AdsApp.report(
"SELECT " +
"customer.id,customer_negative_criterion.id, customer_negative_criterion.type, shared_set.id, shared_set.type " +
"FROM customer_negative_criterion " +
"WHERE shared_set.type = 'ACCOUNT_LEVEL_NEGATIVE_KEYWORDS'");
let rows = report.rows();
while (rows.hasNext()) {
let row = rows.next();
let id = row["customer.id"];
let criteria_type = row["customer_negative_criterion.type"];
let shared_set_type = row["shared_set.type"];
console.log("customer ID " + id, "with " + " criteria type : " + criteria_type + "shared_set_type : " + shared_set_type );
}
}
Additionally, you can utilize the Query Builder and Query Validator to build and validate your queries.![]() |
Google Ads Scripts Team |
[2025-10-23 06:43:55Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01vRa1D:ref" (ADR-00336294)