google-custom-search

Promotion for all search queries - Google Custom Search


I have successfully created by first promotion in Google Custom Search, and I would like to know if it is possible to have the promotion show for every search (Right now the promotion only shows if the search matches one of the triggering queries). The "Promotion Triggering Queries" is a required field, so I don't know what I should enter in it so the promotion is shown on every search. I would like to avoid creating more than one of the same promotion if possible.

I have tried the following:
In the Promotion Triggering Queries box: " * " Regular expression: Unchecked
In the Promotion Triggering Queries box: " * " Regular expression: Checked (This is not allowed)
In the Promotion Triggering Queries box: " test " Regular expression: Checked
In the Promotion Triggering Queries box: " $q " Regular expression: Unchecked
In the Promotion Triggering Queries box: " $q " Regular expression: Checked


Solution

  • The reason your second example failed is because "*" isn't a valid regular expression. An asterisk means "zero or more occurrences of the previous expression", and there is no previous expression there.

    If you use the regular expression ".*" instead (with a single period before the asterisk), you'll create a promotion that matches all queries.

    Example:

    https://cse.google.com/cse?cx=c22c26ba464bf6ac3&q=thisquerydoesntmatchanythingatall