Rich-text Reply

Setting click events on a redirect variation in Optimizely X

DigitalMOD 03-14-17

Setting click events on a redirect variation in Optimizely X

I have two different pages/URLS I'm trying to test against each other as landing pages for a specific audience and I'm using the redirect function. The measure of success is the submission of the form, but the buttons are different elements on each page. I originally set it up so each page had its own click event, but then it isn't really showing the difference between the two. Is there a way to set up one click event which will capture clicks on both buttons?  Is there a better way to set this up altogeher? Please help! Any advice is welcome.

JasonDahlin 03-14-17
 

Re: Setting click events on a redirect variation in Optimizely X

[ Edited ]

When setting up your click events, you can combine two different elements into one like this:

 

Suppose Button_A has this jQuery selector:

$('.button_one')

Suppose Button_B has this jQuery selector:

$('.button_two')

In your click goal, under "Advanced", there is a line item for "Selector".  In that space, you would enter the selectors shown above, but with a comma between them, like this:

.button_one, .button_two

Alternatively, if your forms both go to the same "thank you" (or "step 2", etc.) page, you could set up a Page View goal with that page's URL as the "URL to Track".

 

I prefer to use the goals that most closely measure the actual desired result.  If you want to measure successful form submissions, then I would use a Page View goal (and list all URLs that represent the next page).  If you only care about people clicking on an element, then go with the click based goal.  If your form has validation (there will be a difference between these two events - some users will get errors and then not submit the form).  An example of where I prefer a Click based goal is for elements that represent an interaction on the page (clicking the Add To Cart button, clicking the Login link that opens the login widget on the current page, etc.) 

--Jason Dahlin
Analytics and Testing Guru Smiley Happy
Experimentation Hero