|
Installing the Javascript Code There are several reports in Summary that require the use of client side Javascript to gather information about the client's browser. Getting these reports to work requires minor changes to your web pages. You should pick one page, or a small number of pages, to modify, preferably the page(s) that are the primary entry point(s) for your site. The reports that depend on the Javascript being installed include:
The Javascript code gathers information about the clients browser and passes that information back to the server as a request for the image "/log____image.gif", with additional information in the query string. Summary then uses this information to create the various browser reports. For this to work you must modify your HTML to include the Javascript code, below, and make sure your server is logging the query string. It is often a good idea to put a "/log____image.gif" file on your server. Having a file with that name is not critical; everything still works even if the file is not found. Many servers are faster serving a small file than an error. Also, it is nice to not have to see that request always showing up in the error reports. A small file with that name is provided with Summary in the extras folder. Apache, and other servers using NCSA Common or NCSA Combined log format, will always log the needed information. Microsoft IIS will always log the needed information when using Microsoft or NCSA log formats. Microsoft IIS using W3C format must be configured to include the "URI Query" log field. To log the needed information in WebSTAR you must include either the SEARCH_ARGS or CS-URI-QUERY log tokens (they are identical). There are three versions of the Javascript. The first is very simple and is placed in the <HEAD> section of your HTML. It logs the screen size, Java enabled state, and cookie enabled state. The second script also logs the window size. It is more complex because the window size is not always known until the page has been rendered. The third script adds logging of the installed plug-ins, which takes a small amount of extra time. The first script is the simplest to install. The second is slightly more complex to install but tells you the client's browser window size. The third script gives you the most information, but it also sends back very large requests that take a small amount of extra time to process and takes up more space in the log file. These scripts are safe on any browser, but they will only gather and report information in newer browsers. Netscape Navigator/Communicator 4.x or newer, Microsoft Internet Explorer 4.x or newer, or the equivalent are required for the scripts to work. Since these browsers are by far the most common, the results are meaningful, but keep in mind that there is a slight bias against older machines. Browser plug-in information can only be gathered from Internet Explorer running on the Macintosh, Netscape Navigator/Communicator 4.x or newer on all platforms, and a few of the other browsers. Unfortunately, plug-in information is not available in the Windows version of Internet Explorer. Simple ScriptThe simple script only requires one addition to the HTML. It is the simplest to install but it does not log the window size, Javascript enabled/disabled, or installed plug-ins. Put this in the <HEAD> section of your HTML: Medium ScriptThe medium script adds window size and Javascript enabled/disabled, but still doesn't log plug-ins installed. This script provides more information than the simple script but it is more complex to install. Installation requires four separate additions to the HTML, including an "onload" item in the BODY tag. Put this in the <HEAD> section of your HTML: Add this to the BODY tag:
It should look like this if you don't have any other options on the <BODY> tag: If you already have an onload function specified in your BODY tag, you will need to modify your existing onload function to call ours, or set onload to "whenReady()" and modify ours to call your existing one. Add this just before the </BODY> tag: Add this after the </BODY> tag but before the </HTML> tag: Full ScriptThe full script logs the browser window size and plug-ins installed for Internet Explorer running on the Macintosh, Netscape Navigator/Communicator 4.x or newer on all platforms, and a few of the other browsers. This script provides the most information but it is more complex to install than the simple script. It also takes very slightly more time to execute on the client browser, and it results in larger log files. Installation requires four separate additions to the HTML, including an "onload" item in the BODY tag. Put this in the HEAD section of your HTML code: Add this to the BODY tag:
It should look like this if you don't have any other options on the <BODY> tag: If you already have an onload function specified in your BODY tag, you will need to modify your existing onload function to call ours, or set onload to "whenReady()" and modify ours to call your existing one. Add this just before the </BODY> tag: Add this after the </BODY> tag but before the </HTML> tag. |
Quick Start |
Overview |
Tutorial |
How To |
Configuration
Javascript Code |
Virtual Domains |
Log Formats |
Custom Overviews
Questions |
Reports |
Purchasing |
FAQ |
Glossary
Copyright 1998-2006 by Summary.Net - Updated 2/1/06