Hello Ken,
I’m James from the Google Ads scripts support team. Thank you for reaching out to us.
Within the `Ad Performance Report` solution script, you may check the GAQL query below:
const results = AdsApp.search(`SELECT ${fields} FROM ad_group_ad ` +
`WHERE metrics.impressions > 0 AND ` +
`segments.date DURING LAST_7_DAYS`
From that query, you can now filter those headlines by campaign name. You just need to utilize the campaign.name field in the WHERE clause of the mentioned query. See sample implementation below:
const results = AdsApp.search(`SELECT ${fields} FROM ad_group_ad ` +
`WHERE metrics.impressions > 0 AND ` +
`campaign.name = “sample” AND` +
`segments.date DURING LAST_7_DAYS`
You may try it on your end, then let me know how it goes.
Regards,
|
||||||
Hello Ken,
As the new script experience is now based on Google Ads API infrastructure which mainly supports GAQL, the CONTAINS operator is not supported in GAQL. You may refer to this documentation regarding the supported operators in GAQL. You can, however, emulate this behavior using the new REGEXP_MATCH operator instead of CONTAINS. You may refer below:
`campaign.name REGEXP_MATCH ".*DE.*" AND` +