Rich-text Reply

Tracking text field input

Halfpinay 08-28-14

Tracking text field input

[ Edited ]

Hi all,

 

I'm very new to Optimizely and I was wondering whether it is also possible to track user's input in a text field?

 

I have a text field with a default hint that says 25. Users can either leave that number, or change it. I want to test whether users will input a higher number into the text field when that default number says 50 instead.

 

So I was thinking that to be able to measure any change in average or counts, the number that user's fill in the text field should be tracked.

 

 

siherron 08-28-14
 

Re: Tracking text field input

[ Edited ]

Hi there,

 

This is totally possible using a piece of javaScript.

 

  • Set a variable to the value of the text field, with a default of "25" - lets say numValue
  • Then set an 'if ' statement to push a custom Optimizely event (in order to measure your result) - if the variable numValue is greater than 25, or numValue is less than 25 or numValue is 25 exactly

That's the gist of the javascript, without writing the code for you Smiley Happy does that all make sense?

 

Hope that helps?

 

Simon Herron
Optimisation Consultant
Level 2