Note The TrafficTable object is included in Commerce Server 3.0 only for backward compatibility with sites created in Commerce Server 2.0. New sites should measure traffic with Site Server Analysis.
The InitTraffic method initializes the TrafficTable object. InitTraffic determines what information is to be logged by examining the column names in the destination database table. The following table lists the column names that may appear in the table, along with the information that will be stored into that column by the LogTraffic method.
Column name | Information to be logged |
---|---|
store_name | Text that was provided to InitTraffic as its SiteName argument. Usually this string contains the name of the site. |
shopper_id | Unique identifier of the current shopper, which is provided as the ShopperID argument to the LogTraffic method. |
event | Number provided as the Event argument to the LogTraffic method. This arbitrary number is usually used to identify the type of event being logged. |
item_requested | String provided as the ItemRequested argument to the LogTraffic method. This arbitrary string is usually used to identify the URL of the page being requested. |
event_time | Current time. |
args_argname | Value of a specified URL query string passed to the page in the URL (either from a FORM or a generated URL). argname must match the name of the variable in a query string. For example, if the keyword args_product is listed, then LogTraffic will look for a query string in the URL beginning "?product=" and will include the value specified in the log. |
remote_addr | IP address of the client computer. |
remote_host | Host name of the client computer (in some cases, this value may be an IP address). |
http_argname | Environment variables, such as REFER and USER_AGENT (for example, http_REFER). In names containing hyphens, an underscore is used instead of a hyphen because database column names cannot contain hyphens. |
Traffic.InitManager(Datasource, SiteName, TableName)
REM -- Create and initialize database traffic server
Set MSCSTraffic = Server.CreateObject("Commerce.TrafficTable")
call MSCSTraffic.InitTraffic(MSCSDataSource, "Clocktower", "Clocktower_traffic")