by Metasun Software
Table Of Contents
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.
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.
|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|
|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.sql||SQL Script for creating table in SQL Server database|
|spacer.gif||Transparant image used to create the graphs|
|track.asp||Tracking script that is called to log activity to the database|
|upgrade_0990.asp||Upgrade database script|
Total: 18 files
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
Mandatory Server Requirements
Optional Server Requirements
Installing the Report Generator
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)||
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
However, this is the only way to track screen area (resolution) data.
|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.
To track an html file, add the following line of code in the html somewhere between the body tags:
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.
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.
|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)
|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 188.8.131.52).|
|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.)|
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).
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 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.
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.
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: