clean_keyword

Scans in-string and replaces any of the following characters with replacement-string:

  • ! @ % ^ * () = {} ; ~ ` <> ? \ |
    AdWords does not support these characters in keywords.
  • + " [ ] -
    These characters are match-type modifiers.

Syntax

clean_keyword(in-string, replacement-string)
Learn more about syntax for functions.

Parameters

  • in-string: An inventory attribute such as ITEM_BRAND, or a static string surrounded by quotes such as "Shoes".
  • replacement-string: A static string surrounded by quotes such as " " (you could also specify an inventory attribute).

Learn more about referring to inventory attributes.

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.
Was this helpful?
How can we improve it?