Does anyone know how to send people to different pages depending on their answers to questions on the first landing page?

  • 6 September 2015
  • 3 replies
  • 6 views

Directing visitors to different landing pages based on responses on main lander.


3 replies

Hi Ben, 
This functionality isn’t built into Unbounce natively, but you might be able to achieve this with a bit of custom javascript. If you aren’t fluid in scripting, you could look into hiring someone off Elance or Odesk to whip something up for you. If you find a solution, make sure you come back to the Community to share it with the rest of us. :) 

Hi Ben,

This is something that can be done with a bit of script, nothing majorly complicated, I’ll post the snippet below that should do the trick.

$("#gender").live(‘change’, function() {

switch ($(this).val()) {

case ‘Male’:
window.module.lp.form.data.confirmData = “http://www.google.com”;
break;
case ‘Female’:
window.module.lp.form.data.confirmData = “http://www.bing.com”;
break;
}

});

Just add extra case statemeets in for more options and make sure you update the script to the actual element ID of your dropdown from your lp.

Can’t remember who wrote this originally but I had it stashed with some of my own stuff, it’s just not originally mine I know that much but I hope it helps.

Stuart, you are a life saver. I’m actually going to implement this into a demo page I’m creating. 
Thanks so much!

Reply