MetaTraffic Pre-Release

by Metasun Software


Table Of Contents

  1. Licensing
  2. Overview
  3. Zip Contents
  4. Version History
  5. Requirements
  6. Installation
  7. Upgrading From Previous Versions
  8. Configuration
  9. Troubleshooting Common Problems
  10. Security Considerations
  11. Known Limitations
  12. Support

Licensing

MetaTraffic is distributed as freeware with some restrictions. Please make sure you read the license.txt file for full details. Please pay close attention to Sections 1 and 2.

[top]


Overview

MetaTraffic is a web site statistics application developed in pure ASP. It now supports the following features:

See Metasun's web site for full details.

[top]


Zip Contents

File Name Description
auth.asp Checks to see if the user is authenticated (if security is enabled)
calendar.asp Calendar popup for selecting dates for reports
calendar.gif Calendar image used to popup the calendar date picker
class.asp Contains the metatraffic class that does all the work including logging and report generation. All of the application logic is in this file.
config.asp Configuration file that contains all the program's settings
db.mdb MS Access database
default.asp Page that generates the reports
help.htm Help file
license.txt MetaTraffic software license agreement
link.gif Plus sign graphic used in the Referring Urls report
login.asp Login page that authenticates users to access the report generator
metatraffic.gif MetaTraffic logo
metatraffic.sql SQL Script for creating table in SQL Server database
readme.htm This file
spacer.gif Transparant image used to create the graphs
track.asp Tracking script that is called to log activity to the database
track.js Javascript file to include in HTML pages you want to track
upgrade_0990.asp Upgrade database script

Total: 18 files

[top]


Version History

v0.993 - Feb 3rd, 2003

v0.992 - Jan 14th, 2003

v0.991 - Jan 7th, 2003

v0.990 - Jan 4th, 2003

v0.970 - Dec 22nd, 2002

v0.950 - Dec 9th, 2002

v0.900 - Nov 13th, 2002

v0.861 - Nov 8th, 2002

v0.860 - Nov 6th, 2002

v0.850 - Oct 28th, 2002

v0.801 - Oct 7th, 2002

v0.800 - Oct 2nd, 2002

[top]


Requirements

Mandatory Server Requirements

MS ACCESS

SQL SERVER

Optional Server Requirements

Client Requirements

[top]


Installation

Installing the Report Generator

  1. Extract the contents of the zip file into a folder called metatraffic
  2. Modify config.asp as nessasary (see Configuration for details)
  3. Upload the folder to your web site

Most installations that use MS Access as the database will not require any modification to config.asp if you follow the instructions above. You should still read the configuration options to ensure that reports are displaying the way you want them to.

Setting Up SQL Server

If you would like to use SQL Server as your database, you will need to run the metatraffic.sql file using SQL Server Query Analyzer. This will create the table nessasary for logging and reporting web activity. Once the table is created, create a user or use an existing SQL Server login account that has datareader/datawriter priviledges on that database. Do not use the SA account other than for testing purposes or upgrading the database. Make sure that the config.asp has the proper database settings configured such as specifying the username and password that has the correct privilidges on the database.

Setting Up Tracking

There are three different methods of logging to provide as much flexibility as possible to track activity on your site.

Logging Method Common Uses Description
ASP Track ASP pages (.asp)

Use this method to track your ASP pages by including a snippet of ASP code in your pages. The benefits of using this logging type is that most ASP web applications have a common include that you can simply add a snippet of code and track your entire site. Also, this is the only logging method that will track robots that access your site. The disadvantage of solely using this logging method is that no screen area data is generated as this requires the use of the javascript logging method.

Javascript Track HTML pages (.htm, .html, etc.) This logging method uses javascript executed on the client's web browser. This is the only way to track non-ASP web pages including .html, .cfm, .shtml, .php, .aspx, etc. The downside of using this logging method is that web clients that have disabled javascript in their browser or don't support javascript will not be logged. This includes robots. However, this is the only way to track screen area (resolution) data.

Note: When using this tracking method, there is a configuration option in the track.js file called scriptlocation. This must be set to the file location of track.asp or the javascript logging method will not work.

Redirect Track other files (.exe, .zip, etc.) The redirect logging method is the only way to track downloads, media files such as audio and video and other non-ASP or HTML based files. This is done by calling the track.asp in a link in your web pages that includes a querystring variable that tells the tracking script where to redirect the user after it has logged the request. (See example below)

The ideal way to setup tracking on your web site is to employ a variety of tracking methods. This way, you can see what robots are visiting your site and capture screen area data of your web visitors.

ASP LOGGING METHOD -- ASP PAGES (.asp)

To track your .ASP files, add the following code to any .ASP page that you want to track:

<% Server.Execute("/metatraffic/track.asp") %>

If you need to a standard include, then it would look like this:

<!--#Include Virtual="/metatraffic/track.asp" -->

It is preferable to use the Server.Execute method, specifically if you have ASP script in your pages as it will run independantly of those scripts preventing re-use of variables, etc.

JAVASCRIPT LOGGING METHOD -- TRACKING HTML FILES (.htm, .html, etc.)

To track an html file, add the following line of code in the html somewhere between the body tags:

<SCRIPT LANGUAGE="JavaScript" SRC="/metatraffic/track.js"></SCRIPT>

REDIRECT LOGGING METHOD -- TRACKING OTHER FILES (.zip, .exe, etc.)

You can also track files that aren't web pages by linking to them in your web page with HTML. This is useful for tracking downloads, media files, etc. The link would look like this:

<a href="/metatraffic/track.asp?r=/downloads/somefile.zip">Download somefile.zip</a>

This would track downloads of somefile.zip that existed in a virtual directory called downloads. Once track.asp logs the activity, the user is redirected to whatever file you specify. The querystring variable "r" expects some file location to be passed to it. This can be a virtual file path as shown above, an absolute path or a fully qualified URL such as http://www.somedomain.com/media/myfile.zip. MetaTraffic will not log the domain information (only the file path) so this cannot be used to track outbound traffic as it will not show the domain information in any report.

It is recommended that you use a virtual path when specifying paths as in all the examples above.

[top]


Configuration

MetaTraffic has a configuration file called config.asp containing several program variables. By updating the file with different values, you can control several things in MetaTraffic.

Name Variable Value Default Description
Username strUsername 0 - 20 characters Empty Username for securing the report generator. Leave this string empty to disable username protection.
Password strPassword 0 - 20 characters Empty Password for securing the report generator.
Site Aliases strSiteAliases Host names separated by commas Empty A list of host names used to access the web site that should be excluded from the referrer reports.
Exclude IP Addresses From Log strExcludeIPFromLog IP Addresses separated by commas Empty A list of IP Addresses that you do not want to log traffic for.
Analyze Data intAnalyzeData 0 - 3 1

Controls when data analysis occurs to calculate referrer data, robots, browsers, languages, etc.

0 - Never (Not Recommended)
1 - When Logging (Default)
2 - When Generating Report
3 - Both (Logging and Report Generation)
Show Graph blnShowGraph True or False True Turn graphing on or off.
Session Duration intSessionDuration Integer 60 The number of minutes that a session is considered active and will show up in the Who's Online report for.
Log blnLog True or False True Turn logging on or off. Useful to temporarily disable logging.
Report Chooser Size intReportChooserSize 1-14 1 Controls the size of the select box for choosing the type of report. Setting this to 1 makes it a drop down menu.
Database Type strDatabaseType MSACCESS or MSSQL MSACCESS Type of database to use. MS Access or SQL Server 7 / 2000 are supported.
Database Name strDatabaseName String Value Empty Name of the database. If database type is MSACCESS, then this is the filename of the database (example: db.mdb). If database type is MSSQL, then this is the name of the database.
Database Location strDatabaseLocation String Value Empty Location of the database being used. If database type is MSACCESS, this is the file path of the database. The file path can be a virtual path (example: /metatraffic), a file path (example: c:\inetpub\databases) or just a relative path (example: metatraffic). There should be no trailing slash. If the database type is MSSQL, then this is the server name or address of the database server (example: databaseserver or 192.169.1.100).
Database Username strDatabaseUsername String Value Empty The username with permissions on your database. If you are using MSACCESS as your database type, you can leave this blank. If you are using MSSQL, then this should be set to an account that has datareader / datawriter permissions on the database. It is not recommended that you use the SA or other account with DBO permissions other than upgrading the database.
Database Password strDatabasePassword String Value Empty The corresponding database password for the username specified above.
Locale Session.LCID Integer Empty To control the date formats of the calendar and reports, set the locale to your local location. For a complete list of LCIDs, have a look at Microsoft's MSDN Locale ID Chart. (When looking at the chart, the integer column is the value that needs to used for this setting.)
Script Location scriptlocation String Value Empty The scriptlocation variable is located in the track.js file. This needs to set to the exact file path of the ASP tracking script (track.asp). This only needs to be configured if you are using the javascript tracking method.

Upgrading From Previous Versions

To upgrade from a previous version, please ensure that you read each version change and follow the instructions.

v0.992 --> v0.993

Update the following file(s):

v0.991 --> v0.992

Update the following file(s):

v0.990 --> v0.991

Update the following file(s):

v0.970 (and previous versions) --> v0.990:

SQL SERVER DATABASES ONLY

If you are running SQL Server, change the database username and password to the SA account (or another account that has DBO permissions on the database) in the config.asp file. Make sure you change your database username / password back to a non-SA account once you have finished upgrading the database.

MS ACCESS OR SQL SERVER

Upload and run the upgrade_0990.asp file to upgrade your database. Make sure you delete this file from your web server when you are done as it does not need to be there.

Update the new config.asp file to match your current configuration and update all files except database related files (db.mdb and metatraffic.sql).

[top]


Troubleshooting Common Problems

The most common problem that occurs when setting up MetaTraffic with an MS Access database is an error that says: "Operation must use an updateable query." This is caused by the Internet Guest account (IUSR_MACHINE) not having write permissions on the database file (db.mdb). Please read this Microsoft Knowledge Base Article for more information.

If your Screen Area report says "There is no data to display.", this could be because you are not using the javascript logging method; this is the only way to capture client resolution data.

If you are having difficulty getting the javascript logging method to track page requests, it could be caused by not having the scriptlocation variable configured correctly in the track.js file. Make sure this points to the correct file location of the track.asp file. Also, check your web server logs for errors (assuming cs-uri-query is being logged in your IIS logging options).

[top]


Security Considerations

If you are using MS Access as your database, it is not a good idea to have it in a publicly accessible folder such as in your web site content directory. It is recommended that you move it to a folder on your server that is not accessible via your web site. However, the Internet Guest account (IUSR_MACHINE) of your web server must have read and write permissions on the database file.

[top]


Known Limitations

It is not recommended that you change the intAnalyzeData variable from the default. (Until MetaTraffic v1.0) Changing this option from the default can cause odd reporting behavior and slow generation of reports.

When you track pages using the javascript method, there will be no robot data collected. This is because the robots will not execute the javascript and never log anything to the database.

When you track pages using the ASP method, Screen Area data is not collected. Javascript tracking is required to capture client resolution information.

[top]


Support

If you have support requests, please visit our site and post a message in the support forum. Please make sure you include in your post as many details as possible such as:

[top]