Thanks to Tom Munroe at Infinity Imaging for this document!
RTF version for nicer printing

Using Webglimpse installed on your own server is an ideal site search engine for your website if you use Google Analytics tracking. All you need to do is be sure you put your Google Analtyics tracking code on your site search page and your wgoutput.cfg file that displays Webglimpse search results.

Example Analytics tracking code:

<script type="text/javascript">






Do not modify the Webglimpse form action in any way on your search page. Use the standard webglimpse form action tag for your site.


<FORM method=get NAME="wgform" ACTION="/cgi-bin/wg2/webglimpse.cgi">

Check your analytics data and it should be correct. If it is not correct you will have to determine why you are not getting the correct Analytics data from your website. It is beyond the scope of Webglimpse to assist you with installing Google Analytics for your website, but the above instructions and examples have been verified as correct. If you have any problem with your Analytics data you should be certain you have the correct Analytics tracking code on your site search page and in your wgoutput file.

The Google Analytics tracking script needs to be inserted in the <HEAD> section of your wgoutput.cfg file:


Webglimpse also works well with ecommerce shopping cart software. You will have to use the correct specific hidden input data values for your specific ecommerce software.

You must be certain the Webglimpse form action statement on your website's user search page passes the proper values to Webglimpse so your site maintains your visitor's shopping cart and any session data correctly.

EXAMPLE: Here is an example ecommerce implementation using Webglimpse with Mertcantec Softcart 5.1.2:

<FORM method=get NAME="wgform" ACTION="USERGEN#/cgi-bin/wg2/webglimpse.cgi">


<INPUT TYPE="HIDDEN" NAME="prepath" VALUE="/cgi-local/SoftCart.exe">

<INPUT TYPE="HIDDEN" NAME="insertbefore" VALUE="/online-store">

<INPUT TYPE="HIDDEN" NAME="postpath" VALUE="?L+scstore+%%SoftCart.SessionID%%">

<!-- Admins - you can tweak behaviour by adjusting these hidden tags -->

<INPUT TYPE=HIDDEN NAME=nonascii VALUE='off'> <!-- set to 'on' if using filters -->

<INPUT TYPE=HIDDEN NAME=maxfiles VALUE='20'> <!-- number of results per page -->

<INPUT TYPE=HIDDEN NAME=maxlines VALUE='20'> <!-- matching lines per file -->

<INPUT TYPE=HIDDEN NAME=maxchars VALUE='300'> <!-- num characters to print per match -->

<INPUT TYPE=HIDDEN NAME=cache VALUE='yes'> <!-- make a Next Hits toolbar -->

<INPUT TYPE=HIDDEN NAME=limit VALUE="500:100"> <!-- limit results to most recent 100 files, 500 matches for speed -->

<!-- End admin configuration section -->

<INPUT TYPE=submit VALUE="Search for:">&nbsp;<INPUT NAME=query size=40>&nbsp;<INPUT TYPE=submit VALUE=Go>


Look for <SELECT NAME="autosyntax">


<OPTION VALUE="ANY">ANY of the words


</SELECT> typed above.


1. USERGEN# is a standard Softcart tag for maintaining shopping cart id and session data while a form is being executed. You might need to use USERPROG# instead on for some softcart sites - you will have to determine if you need this change. Most likely USERGEN# is the correct softcart tag. This tag applys to Mercantec Softcart only!

2. <INPUT TYPE="HIDDEN" NAME="prepath" VALUE="/cgi-local/SoftCart.exe">

With Softcart the URLs that display in the user's browser are modified by Softcart from their actual directory urls (example: to

In this example Softcart always inserts "/cgi-local/softcart.exe" in the url so the value for the above hidden "prepath" input is VALUE="/cgi-local/SoftCart.exe". If you are using softcart limited to 100 items your prepath value would be something like"VALUE="/cgi-local/SoftCart100.exe". Just be sure you use the correct exe file name for your ecommerce package.

3. <INPUT TYPE="HIDDEN" NAME="insertbefore" VALUE="/online-store">

This hidden input tag simply tells Webglimpse where to insert the above "prepath" value in your Webglimpse search results page URLS.

4. <INPUT TYPE="HIDDEN" NAME="postpath" VALUE="?L+scstore+%%SoftCart.SessionID%%">

This hidden input with Mercantec Softcart preserves the correct shopping cart id and session data and adds it to the Webglimpse search results page URLs at the END of each URL. "?L+scstore" is standard Softcart state tracking and Softcart configuration data.

If your Softcart configuration file name is different (example: mystore.cfg) then you would modify the above hidden input to read:

<INPUT TYPE="HIDDEN" NAME="postpath" VALUE="?L+mystore+%%SoftCart.SessionID%%">.

The %%SoftCart.SessionID%% statement in the above hidden input for "postpath" is the standard dynamic session ID tag used in Softcart to generate the shopping cart id and session data.

Using simple substution for the hidden input values you need based on your ecommerce software you should be successful implementing Webglimpse with other brand ecommerce software besides Mercantec Softcart. The above example works perfectly with Mercantec Softcart 5.1.2 provided you use the correct path and store name in your input values for your website.


If you combine the instructions for Analytics above with the instructions for Mercantec Softcart your Softcart ecommerce website will work properly with both Mercantec Softcart and Google Analytics. If your website is not an ecommerce website with shopping cart software, use only the instructions for using Webglimpse installed on your own server with Google Analytics.

If your ecommerce software is some other software package like Miva Merchant, etc, you will have to determine the proper hidden input values and shopping cart tags if needed for your "USERGEN#" "prepath" "insertbefore" and "postpath" statements, but the Google Analytics installation will probably be exactly the same. You may not need a tag like USERGEN#.

You also have the option of using only some of the hidden inputs if your ecommerce software structures its dynamic URL's differently