PDA

View Full Version : User defined variable on enrolment form


mfavre
03-27-2009, 07:01 PM
Hi all, I'm trying to set up a user defined variable in an enquiry form to measure the number of male/female who subsequently turn into a conversion on the next page. My form contains a pull down menu where people can choose between male/female.

My form has the following code:

<form name="frmJBJH2006" method="post" onSubmit="javascript:Ins();">

...

<td>
<select name="sltSexo" class="form">
<option value="0">&nbsp;</option>
<option value="woman">woman</option>

<option value="man">man</option>
</select>
</td>
...

Google gives the following information to add variables: http://www.google.com/support/analytics/bin/answer.py?answer=57045


Therefore, following Google's guidelines, is it correct to add the following onSubmit tag:

<form name="frmJBJH2006" method="post" onSubmit="javascript:Ins();" onSubmit="pageTracker._setVar(this.sltSexo.options
[this.sltSexo.selectedIndex].value);">



Cheers

AussieWebmaster
03-27-2009, 10:54 PM
it looks okay... have you tested it yet