function getShoppingAdGroup() {
var campaignName = 'INSERT_CAMPAIGN_NAME_HERE';
var adGroupName = 'INSERT_ADGROUP_NAME_HERE';
var adGroupIterator = AdsApp.shoppingAdGroups()
.withCondition("CampaignName = '" + campaignName +
"' and AdGroupName = '" + adGroupName + "'")
.get();
while (adGroupIterator.hasNext()) {
var adGroup = adGroupIterator.next();
var adGroupCost = adGroup.getStatsFor("TODAY").getCost(); //Insert your date range
if(adGroupCost > 100) { // Insert your own cost threshold
adGroup.pause();
adGroup.applyLabel("Paused"); //Use your label
}
}
}
--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-scripts+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/16558f8f-4be9-40a8-980b-9e4b117840b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-scripts+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/bdec34cb-87e0-4cde-95a8-9c924841ef5a%40googlegroups.com.
function main() {
function getShoppingAdGroup() {
var campaignName = 'Shopping: Shopping - Google Group0';
var adGroupIterator = AdsApp.shoppingAdGroups()
.withCondition("CampaignName = '" + campaignName)
.get();
while (adGroupIterator.hasNext()) {
var adGroup = adGroupIterator.next();
var adGroupCost = adGroup.getStatsFor("TODAY").getCost(); //Insert your date range
if(adGroupCost > 2) { // Insert your own cost threshold
--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-scripts+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/ca9433d3-50dd-4132-88d9-a616add16fff%40googlegroups.com.