[BSD] Branded Shopping Script

81 views
Skip to first unread message

Alejandro Loza

unread,
Aug 14, 2024, 7:09:24 AM8/14/24
to Google Ads Scripts Forum
Hello

I uploaded this  script to create a brand shopping campaign:  https://drive.google.com/file/d/1rnICC07mDGh386XQ_BH_1PUS8pF3P_7N/view 

The scrip will add all non brand terms to a negative keyword list

But it's not working

These are the errors that I have: 
11.png

And this is my script with my values  
script.txt

Nils Rooijmans

unread,
Aug 15, 2024, 3:21:14 AM8/15/24
to Google Ads Scripts Forum
this error indicates that the function definition for 

 getOrCreateNegativeKeywordList(listNames[i]);

is missing.

But is does show in the Google Doc:

function getOrCreateNegativeKeywordList(listName) {
    var lists = AdsApp.negativeKeywordLists().withCondition('Name = "' + listName + '"').get();
    if (lists.hasNext()) {
        return lists.next();
    } else {
        return AdsApp.newNegativeKeywordListBuilder().withName(listName).build().getResult();
    }
}


did you copy _all_ of the code in the Google Doc into the Google Ads script editor?

Hope this helps,

Nils Rooijmans
https://nilsrooijmans.com
See my Google Ads Scripts FAQ to avoid the same mistakes I made: https://nilsrooijmans.com/google-ads-scripts-faq/

Alejandro Loza

unread,
Aug 26, 2024, 9:56:57 AM8/26/24
to Google Ads Scripts Forum
Hello Nils!! :)

Sorry for my late reply, I was out of the office.

Yes, you right, there were some lines missing in my code...not it works with no errors :) 

And now 3 questions about the script behaviour. 

First question: 

My campaign already have 12k search terms

Negative keyword lists have a 5k entries limit

So I created more than one list. 

I expected two list of 5k keywords and rest of keywords in the third list. 

But the first two list have 4997 keywords

5.png

There were 3 search terms with more than 10 words, and maybe that's why. 

But I expected the script to skip them and keed filling the list up to 5000 keywords. 

And related to lists, is there a way to know how many list do I have to create? Is there any notification that tells my all of them all full and I do need to create a new one? 


Second question: 

After running the script 20 search terms are not excluded. 

I expected them to be branded, but it's not the case for all

My brand is "rajapack". 

I expect the search terms in red rectangles to be excluded too, why this is not the case? 

6.png

Third question: 


Another behaviour I dont understad is that the script deletes the list content each time is applied

3.png

Is that the expected behaviour?

For me it would be interesting to add some keywords manually to these lists to avoid some search terms and reduce the spending beforehand and avoid the search query report to grow very big. 

Is that possible? 

Google Ads Scripts Forum Advisor

unread,
Aug 26, 2024, 1:54:58 PM8/26/24
to adwords...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads Scripts support team.

Please find the below responses for your queries:

1) Please be informed that when you have more than 5k keywords, you'll need to create multiple lists. If you encounter the issue, consider breaking down these long-tail keywords into shorter, more manageable phrases. Also, there isn't a built-in notification system in Google Ads Scripts to inform you when a list is full.

2) If the search terms in the red rectangles are not being excluded, I would suggest you ensure that the keywords are entered correctly, including capitalization and punctuation. Verify that the negative keyword lists are applied to the correct campaigns or ad groups.

3) Kindly note that it is not directly supported by the script, you could potentially add keywords manually to the negative keyword lists.

If you still need any further assistance, In order to investigate further, kindly provide us with the following details:
  • Google Ads account ID / CID
  • If the script uses a spreadsheet, please provide a shareable link to the spreadsheet.
You can send the details via Reply privately to the author option, or direct private reply to this email.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02vFOpN:ref" (ADR-00264916)

Thanks,
 
Google Logo Google Ads Scripts Team

 

Reply all
Reply to author
Forward
0 new messages