{= include("docs.util"); start_docs_page(docs.technical_manual.page_titles.screeninfo); =}
Custom Design your Web Pages for your Visitors
When analyzing the traffic to your web site, it is often useful to know the size of the monitors that your visitors are using. Knowing the screen dimensions, width and height as measured in pixels will allow you to design web pages that will fit on the monitors of those visiting you. Also knowing the screen depth, depth in bits; i.e. the number of available colors, will help you decide what colors to use in your images. This information is not generally available in web server log data, but you can add it by including the following small JavaScript program in one or more of your HTML pages:
<script language="JavaScript"> document.write('<img width="1" height="1" src="/log_analysis_screen_info.gif?' + 'width=' + screen.width + '&height=' + screen.height + '&depth=' + screen.colorDepth + '">\n'); </script>
Just copy the script, paste it at the bottom of one of your web pages, and you're done. This script causes an extra entry to be included in the log data for each line processed. This entry, which appears as a hit on the file /log_analysis_screen_info.gif, is used automatically by $PRODUCT_NAME when analyzing web logs to compute the values of the derived "screen dimensions" and "screen depth" log fields, which are displayed in the statistics in the "Top screen dimensions" and "Top screen depths" views.
The image /log_analysis_screen_info.gif does not need to exist, but if it doesn't, you will see 404 errors (broken links) in your statistics for the file, and in some browsers you may see a small dot on your page where the JavaScript code appears. If you don't want to see these, you need to create an image file at the root of your site called /log_analysis_screen_info.gif. A blank or transparent image is a good choice. You can also put the image somewhere else on your site, and change the JavaScript to match, but the name of the image and its parameters must remain the same. However, it will actually slow your page down slightly if the image exists -- it is usually best not to create the image file.
{= end_docs_page() =}