Tracking Form Elements

The dcsMultiTrack function can be activated by any JavaScript event. For example, if you want to track how a visitor progresses through a particular form so that you can configure a Scenario Analysis report to track where visitors drop out of the process, you can use the dcsMultiTrack function to track each form element separately, sending a virtual page view whenever a visitor fills out a form element.

The following example illustrates how to set up dcsMultiTrack to track which form elements the visitor completes. Note that each form element to be tracked is tagged with DCS.dcsuri and specifies the URL page where the tagged element .htm file resides.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Sign Up Here!</title>
<meta name="WT.si_n" content="RegistrationForm">
<meta name="WT.si_x" content="1">
</head>
<body>
<form action="http://www.tipjar.com/cgi-bin/test method=post>
<p>
<input name="First Name" type="text" value="" size="40" maxlength="100"
onchange="dcsMultiTrack('DCS.dcsuri', '/FirstName.htm',
'WT.ti', 'First%20Name%20Field', 'WT.si_n', 'RegistrationForm',
'WT.si_x', '2');">First Name</p>
<p>
<input name="Last Name" type="text" value="" size="40" maxlength="100"
onchange="dcsMultiTrack('DCS.dcsuri', '/LastName.htm',
'WT.ti', 'Last%20Name%20Field', 'WT.si_n', 'RegistrationForm',
'WT.si_x', '3');">Last Name</p>
<p>
<input name="Email Address" type="text" value="" size="40" maxlength="100"
onchange="dcsMultiTrack('DCS.dcsuri', '/Email.htm',
'WT.ti', 'Email%20Field', 'WT.si_n', 'RegistrationForm',
'WT.si_x', '4');">Email Address</p>
<p>
<input type=submit value="submit"></p>
</form>
</body>
</html>

When a visitor fills in each field of the form, the Pages report shows the URL for the HTML page itself, as well as URLs for /FirstName.htm, /LastName.htm, and /Email.htm. The Registration Form Scenario Analysis report is also be populated with all four steps reflected in this example. If the "Thank you" page has the appropriate META tags for the fifth step of the scenario, you can obtain a granular view of how visitors are interacting with your form.