enable autocomplete in google custom search

How to enable Autocomplete in Google Custom Search

Rate this article

Share this article

The autocomplete

Method 1-Using the control panel.

  1. Go to your google custom search control panel.
  2. Go to Search features->autocomplete->Enable autocomplete.custom search autocomplete

Method 2- Editing the google custom search code

In the google custom search code, replace

<gcse:search></gcse:search>

with

<gcse:search enableAutoComplete="true"></gcse:search>

For example-

<script>
  (function() {
    var cx = '003606982592251140240:5xbiwoxb3m0';
    var gcse = document.createElement('script');
    gcse.type = 'text/javascript';
    gcse.async = true;
    gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(gcse, s);
  })();
</script>
<gcse:search enableAutoComplete="true"></gcse:search>

 

This will enable autocomplete.custom search autocomplete

As you can see the autocomplete you get from google custom search is not of great quality.

For an faster and ad free search autocomplete experience, move to expertrec.

custom search autocomplete

Build your search autocomplete

Are you showing the right products, to the right shoppers, at the right time? Contact us to know more.
You may also like