AdWords
4.5K members online now
4.5K members online now
Dive into advanced features like Remarketing, Flexible Bid Strategies, AdWords Editor, and AdWords Scripts
Guide Me
star_border
Reply

Script: Master Negative List doesn't include Shopping campaigns

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi there,

I used this script in my accounts, but it only activates the master negatives list for text ad campaigns, not Shopping (and I do want that). I didn't use labels. The script should apply to all active and paused campaigns so including Shopping. Did I do something wrong or do I need to add a line of script?
https://developers.google.com/adwords/scripts/docs/solutions/mccapp-master-negative-list

Hope to hear from you,
Elcke

1 Expert replyverified_user

Script: Master Negative List doesn't include Shopping campaigns

[ Edited ]
Badged Google Partner
# 2
Badged Google Partner

You can add a negative keywords list under the "Shared Library" and select "Campaign negative keywords list", it will be applicable to the campaigns selected under the account Smiley Happy

This is the step-by-step instructions: https://support.google.com/adwords/answer/2453983?hl=en

You can maintain a central list at the account level and apply on multiple campaigns. You can access the feature under "Shared Library" and then "Campaign negative keywords."

Hopefully this will solve your problem 

Regards,

Syed Sayem Mustafa

Script: Master Negative List doesn't include Shopping campaigns

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi Syed, 

 

The solution you address is a manual one. I would like to tweak the AdWords script so the script automatically applies the negatives list to all my campaigns (including Shopping).

Do you have an idea?

 

Thanks,

Elcke

 

Re: Script: Master Negative List doesn't include Shopping campaigns

Top Contributor
# 4
Top Contributor

Hi @Elcke T the problem is that AdWords sees "regular" Campaigns as different from Shopping Campaigns, and they have a different selector in Scripting.  The method AdWordsApp.campaigns() (as is used in the script example) will not retrieve Shopping Campaigns so they're never part of the process.

 

This might be relatively easy to fix.  Around the middle of the script is the following line:

var campaignsToAdd = AdWordsApp.campaigns().withIds(Object.keys(campaignIds)).get();

This is what builds the list of Campaigns to use but it'll won't include Shopping Campaigns.  Replace that line with the following:

var campaignsToAdd = AdWordsApp.campaigns().withIds(Object.keys(campaignIds)).get();
var shopCampaigns = AdWordsApp.shoppingCampaigns().withIds(Object.keys(campaignIds)).get();
while(shopCampaigns.hasNext()) {
campaignsToAdd.push(shopCampaigns.next());
}

This should get a second selection of the Shopping Campaigns then add them to the original list of "regular" Campaigns.  Beyond this, everything else (I think) should work OK.

 

Try it out and let me know what happens.

 

Jon

 

AdWords Top Contributor Google+ Profile | Partner Profile | AdWords Audits

Script: Master Negative List doesn't include Shopping campaigns

Follower ✭ ☆ ☆
# 5
Follower ✭ ☆ ☆

Hi,

 

The code above looks spot on, but unfortunately it isn't possible to add shared lists to shopping campaigns via scripts. 

More on the scripts forum:

 

https://groups.google.com/forum/#!searchin/adwords-scripts/shopping$20addNegativeKeywordList$20%7Cso...