Rich-text Reply

Best way to track checkbox value as an experiment metric

carbonsam 02-14-17
Accepted Solution

Best way to track checkbox value as an experiment metric

What is the best way to use the value of a checkbox (checked or unchecked) as the main Optimizely metric in an experiment? We're setting up an experiment right now to test the copy on an "opt-in" checkbox for a form and we'd like to see which variation gets the most "opt-ins". Has anyone done something like this before? Thanks!

Samuel
JasonDahlin 02-14-17
 

Re: Best way to track checkbox value as an experiment metric

[ Edited ]

When the user submits the form, if the optional checkbox is checked, trigger a "success event"/"goal" to Optimizely.  I would also send a goal for "submits" (so you canverify that the altered text of the optional checkbox does not drive down form conversions).

 

(You can set up this by adding a function to the form submit as "experiment javascript")

--Jason Dahlin
Analytics and Testing Guru Smiley Happy
Experimentation Hero
carbonsam 02-14-17
 

Re: Best way to track checkbox value as an experiment metric

The two event approach sounds like it could work, but is there a way to send just one event and use tags to send the value of the checkbox back to Optimizely instead? See the developer docs here. I think that would be a cleaner solution if it's possible.

Thanks for your help, Jason!

Samuel
JasonDahlin 02-14-17
 

Re: Best way to track checkbox value as an experiment metric

@carbonsam- we are saying the same thing.

 

An event is something that happens or does not happen.  It does not have alternate values.

You would need to set up two goals:

1- box_checked

2- box_unchecked

When the user clicks the submit button, send the approriate event (call a single function that looks to see if the box is checked or not and sends the appropriate event).

 

However... I am thinking a "segment" may be a better option for this... if the form has validation, it is quite possible that you would be recording your event without the user actually completing the form.  In an idea case, you would probably want these events discarded.

 

Suppose you:

1- create the segment "the_checkbox"

2- when user clicks [submit], you add the user to the segment with a value of "checked" or "unchecked".

When viewing your experiment results, look at the number of "thank you pages" for each segment to see which one resulted in more "checked".

 

If you just want to know if users check the box or not, then you could send an event whenever the checkbox becomes checked.  This would not account for users who un-check the box then submit, but may be close enough for your purposes.

--Jason Dahlin
Analytics and Testing Guru Smiley Happy
Experimentation Hero
carbonsam 02-15-17
 

Re: Best way to track checkbox value as an experiment metric

Thanks for your help Jason! I decided to go with the two event approach for speed purposes: one for form submits and the other for when the checkbox is checked. Those other options look good - I'll remember those for my next project.

 

Thanks again,

Samuel