Recommended process and considerations for programming with the Webtrends Data Collection API.
- Create a data source in Webtrends Administration. The dcsid associated with your
data source is the dcsid you will use in your requests to the data collection
- Begin developing your application code.
- Based on the goals of your application, determine what kind of events you want to
track. For example, you may want to track the beginning and ending of each user's
interactions with your application as an event.
- Determine which parameters you will use to track these events. The Data Collection
API supports a large number of parameters already in use by Webtrends. You can also
pass key-value pairs already in use by your application code, or create your own
custom parameters to pass event information.
- Use the sample code provided on this developer site as an example of how to embed
URI requests containing these parameters and their values into your application
code. The sample code contains detailed comments to assist you. For more information
about required parameters and the URI request structure, see the Data Collection API
- If you want Webtrends to generate a unique visitor ID for each application user, use
the Get Visitor ID request to retrieve an ID. Then pass that ID in the wt.co_f
parameter when you post data for that visitor. For more information, see Identifying
- Using the dcsverbose parameter, you may validate your requests against the data
collection server. dcsverbose returns detailed information about the success or
failure of each request in the response body. The response body of a successful
request contains the contents of the SDC logfile line that would have been
written. The response body of a bad request contains error detail information.
In this way, the response body can be used to validate the request. Use the
dcsformat parameter to specify the format of the response body as plain text or XML.
- When your code validation is complete, you should remove dcsverbose from your
requests to conserve bandwidth.
- Create a profile based on the data source you create in Step 1. You should also
create custom reports for any parameters not covered by standard reports. This
profile will collect and analyze the data you passed to the data collection