Support » Knowledge Base » Shop-Script » Useful tips »
Online service Google Analytics offers web masters a convenient tool for analyzing product search in their online storefronts — site-search tracking. That feature allows you to evaluate the effectiveness of the product search in your online store; the results of such evaluation may require certain modifications to your online catalog to make the search more efficient.
In order to enable site-search tracking, log in to your Google Analytics account, open the website-profile editing section as explained in the article about setting up Google Analytics, and enable the "Do Track Site Search" option:
![]()
Enter the names of the search query parameters separated by a comma, which you would like to be tracked, in field "Query Parameter"; e.g.:
searchstring,search_name,search_price_from,search_price_to
Note: You may enter a maximum of 5 parameter names in that field.
In WebAsyst Shop-Script, the following parameters can be used for product search:
searchstring: simple search, usually available on all pages of the storefront;
search_name: advanced search within a category, this parameter corresponds to the name of the product being searched;
search_price_from, search_price_to: advanced search within a category, these parameters correspond to the lower and the higher ends of the price range, within which search is performed;
search_with_change_category_ability: ability to select the category, within which search shall be performed, from a drop-down list in the search form;
search_in_subcategory: search is also performed subcategories of the current category;
advanced_search_in_category: advanced search by several parameters;
tag: search by tags (is performed when a customer clicks a link in the tag cloud).
If you have set up extra product parameters for categories in your online storefront, you may also specify them in the list of search query parameters; e.g.:
searchstring,search_name,search_price_from,search_price_to,param_47
In the above example, param_47 is the name of an extra product parameter. You can find the names of such parameters in the HTML code of the category page in your browser by right-clicking it with a mouse and selecting menu item "Page source" (its caption may be slightly different in different web browsers). The name of an extra search parameter is contained in the name attribute of the appropriate INPUT or SELECT element corresponding to a text box or a drop-down list. The HTML code of such an element may be similar to that shown below:
<input type="text" name="param_47" value="" size="16">
or
<select name="param_47">
Tip: The full list of available search query parameters can also be obtained from the address bar of your web browser. To do so, run the search routine once and analyze the URL of the resulting page. It may look as follows:http://mydomain.com/category_search/?search_with_change_category_ability=1
&categoryID=1653&search_name=iPhone&search_price_from=25000&
search_price_to=35000¶m_47=75&search_in_subcategory=1&
advanced_search_in_category=Find
If you are planning a more thorough analysis of the product search in your online storefront, also enable the "Do you use categories for site search?" option. Enter the name of the search parameter corresponding to product categories in the provided text field: categoryID.
After specifying the desired options, click "Save Changes" at the page bottom.