Skip to content

Redirecting User

In Aliveforms, JavaScript API can be used to redirect the visitor. This snippet can be used in score calculation form. Based upon score, user can be redirected to different URL.

Setup

Logic For Screen RESULT

Execute JavaScript | RESULT
let score = $.Var('RES:SCORE');
score = parseInt(score);
if (score < 90) {
  $.Var('EXTRA', ", Let's talk about LinkedIn training...")
  setTimeout(function() {
    window.location.href = 'https://www.aliveforms.com/'
  }, 3000)
} else {
  $.Var('EXTRA', ', Awesome!!!')
}