Google Ads Script add search queries to negative keyword list - google-ads-script

I'm using this code to go through all search queries of my Google Search campaigns and then add certain search terms as negative keywords. Currently, it's adding the negative keyword into each ad group. How can I change the script to add the search terms as keywords in an existing negative keyword list?

Related

Google Sheets FILTER array notation with exclusion

I'm currently using filter formula on Google sheets and am trying to find a way to exclude cells that meet a specific criteria from this.
Here is a link to what I am using, and I'm trying to get it to say, if column X is populated, exclude it from the filter.
FILTER multiple ranges/columns
I'm currently using this and it works really well, but I've been asked to exclude items, but don't know how to do this.
Example from the link in my question:
=filter({Sheet1!A13:B,Sheet1!E13:G}, Sheet1!N13:N>E2)
You can use COUNTIF, try:
=filter({Sheet1!A13:B,Sheet1!E13:G}, Sheet1!N13:N>E2, not(countif(items_to_exclude, column_where_items_to_exclude_are_located)))

Fill rows when a value is not in a column in google sheets

I need to create a list from a column when the cell doesn't contain a given text.
In the example above I want to exclude the folders that have the words (Archive, Rollback, rollback) as below.
I know
=countif(B2:B20,"<>*Archive*")
gives us the count but doesn't allow me to define more than one search phrase and also doesn't give a list.
Is it possible to use an Array Formula? where =ARRAYFORMULA(B2:B20) can be changed to exclude the words in B22
Test Sheet is in https://docs.google.com/spreadsheets/d/1WnGEsuuJcKsHVhpyYCX5EpmIxuKQEst5XVXgeETzxJ4/edit?pli=1#gid=1789577026
See the 'List_Excluding_Words' worksheet and feel free to add a worksheet with possible solutions.
Would a regex method work in this case like? Google Sheet REGEXMATCH function case insensitive
I understand this can be done using filters but I want a full list so I can run other processes on it and it doesn't allow for more than one phrase.
In B26 on the tab 'JPV_HELP' I entered
=filter(B2:B20, not(regexmatch(B2:B20, "(?i)Archive|Rollback")))
See if that works for you?

use of + sign in Google Adwords

I want to do a phrase match search like "warrenton home values" but I'd like to make sure home+values stay in that order but can be switched so that "home values warrenton" and "warrenton home values" will both trigger.
I thought the + sign would "chain" the two words, home+values together but after a chat with a Google rep I find myself more confused than before. What is the best way to achieve this?
Will this phrase also trigger warrenton island home values keyword search or does the use of quotes only match words found within the quotes? I need to make sure I keep warrenton in the search phrase to avoid wasting budget on triggering ads outside of the geographic area.
You can add a modifier, the plus sign on your keyboard (+), to any of the terms that are part of your broad match keyword phrase. By adding a modifier, your ads can only show when someone's search contains those modified terms, or close variations of the modified terms, in any order. The modifier won't work with phrase match or exact match keywords.
Example: +women's +hats
Example Search: hats for women
Unlike broad match keywords, modified broad match keywords won't show your ad for synonyms or related searches. For this reason, it adds an additional level of control. Using broad match modifier is a good choice if you want to increase relevancy even if it means you might get less ad traffic than broad match.
More information here: https://support.google.com/adwords/answer/2497836?hl=en&authuser=1

Youtube API automatically filters out "alphabet/number-added to search string"?

Let's say I search Youtube API for "Metric"
But I don't want search results like "econometrics" "metrics"
So I mean NO alphabet or number should be added to the left or right to the search string.
A space can be put to the left or right to the search string, like "Fun Metric course".
I was thinking about this.
But interestingly, when I search Youtube website (not API), if I search for "Metric", then only search results with "Metric" but no "econometrics" are displayed.
Another example: If I search for "microecon", then no search results with "microeconomics" are displayed.
Does Youtube website automatically filters out such words (like econometrics which have alphabets added to original search string "metric") even if I don't ask it to do so?
Similarly, does Youtube API (NOT website) automatically filters out such words (like econometrics which have alphabets added to original search string "metric") even if I don't ask it to do so??
It may be different for api version 3, but the documentation only refers to "The q parameter specifies the query term to search for".
But there is some brief documentation for this q paramter in api version 2.
See:https://developers.google.com/youtube/2.0/reference#qsp
Since it's very brief, here it is also:
The q parameter specifies a search query term. YouTube will search all video metadata for videos matching the term. Video metadata includes titles, keywords, descriptions, authors' usernames, and categories.
Note that any spaces, quotes or other punctuation in the parameter value must be URL-escaped.
To search for an exact phrase, enclose the phrase in quotation marks. For example, to search for videos matching the phrase "spy plane", set the q parameter to %22spy+plane%22.
Your request can also use the Boolean NOT (-) and OR (|) operators to exclude videos or to find videos that are associated with one of several search terms. For example, to search for videos matching either "boating" or "sailing", set the q parameter to boating%7Csailing. (Note that the pipe character must be URL-escaped.)
Similarly, to search for videos matching either "boating" or "sailing" but not "fishing", set the q parameter to boating&7Csailing+-fishing.

Google Search Appliance wildcard character support

Does Google Search Appliance support wildcard characters in the query string. If no, is there any way I can fetch all the result set through my query?
The GSA does not support wildcarding. An option can be toN-Gram the fields or content that you want wildcarded. This would be achieved in your feeder or pipeline.
If waiting and upgrading the gsa software to v 7.2,.coming mid December is an option you will have wild card search built in.
Otherwise you have to dig deeper. A possible option is a document filter. If you are interested in that option I might be able to help.
I have developed such a document filter.
GSA software 7.4 has wildcard search built in. From documentation:
Enabling Wildcard Search
Wildcard search is a feature that enables your users to search by entering a word pattern rather than the exact spelling of a term. The search appliance supports two wildcard operators:
*--Matches zero or more characters
?--Matches exactly 1 character
Using wildcards can simplify queries for long names, technical data, pharmaceutical information, or strings where the exact spelling varies or is unknown. A user can search for all words starting with a particular pattern, ending with a particular pattern, or having a particular substring pattern.
By default, wildcard indexing is disabled for your search appliance. You can enable or disable wildcard indexing by using the Index > Index Settings page. You can disable or enable wildcard search for one or more front ends by using the Filters tab of the Search > Search Features > Front Ends page.
One way to get all indexed items from a collection is to use a query that will match every indexed record, e.g., supposing you're indexing some set of URLs from subdomain.companyname.com, just query for "companyname", with the "&num=1000&filter=0" query string parameters.

Resources