Configure Google Analytics Site Search

If you already have a Google Analytics account, you can configure Analytics Site Search reports from within Programmable Search Engine.

To enable Google Analytics Site Search, you must add the Google Analytics tracking code to your site.

Configure Google Analytics Site Search reports:

  1. On the Programmable Search Engine home page, under Edit search engine, select the search engine you want.
  2. Click Statistics, and then click the Google Analytics tab.
  3. Select the Google Analytics profile you would like to use from the drop-down menu.
  4. In the Query parameters box, type the query parameters you want to use. Please enter only the word or words that designate an internal query parameter such as "term,search,query". Sometimes the word is just a letter, such as "s" or "q". You can provide up to five parameters, each separated by a comma.
  5. (Optional) If your search engine includes refinements, type the category parameter in the Category parameters box.
  6. Click OK.

Your page should now contain both the Programmable Search Engine snippet and the Google Analytics tracking code, like this:

      <!DOCTYPE html>
        <!-- Paste your search engine code snippet (for search results) here. -->

        <!-- The following is your Google Analytics setup code. -->
        <script async src=""></script>
          window.dataLayer = window.dataLayer || [];
          function gtag(){dataLayer.push(arguments);}
          gtag('js', new Date());

          gtag('config', 'UA-12345678-1');

You’re done. You can now see Site Search reports in Google Analytics. Note that it may take several hours before data is available for viewing.

Clear search
Close search
Google apps
Main menu
Search Help Center