Scans in-string and replaces any of the following characters with replacement-string:
! @ % ^ * () = {} ; ~ ` <> ? \ |
Google Ads does not support these characters in keywords.+ " [ ] -
These characters are match-type modifiers.
This function can be used only in inventory templates in manual campaigns. Templates in upgraded inventory management use a different set of functions.
Syntax
CLEAN_KEYWORD(in-string, replacement-string)
Specify the function name in upper case: CLEAN_KEYWORD
Parameters
- in-string: An inventory attribute such as
BRAND
, or a static string surrounded by quotes such as "Shoes".
Specify standard attributes in upper case; use the Search Ads 360 UI for guidance on specifying custom attributes. - replacement-string: A static string surrounded by quotes such as " " (you could also specify an inventory attribute).
Example
[TRIM(CLEAN_KEYWORD(PRODUCT_ID, " "))]
applies the function to the product ID returned from the inventory feed. For example, if the product ID is "Bolt (10x)", the function returns Bolt 10x.