var createExpHelperInst = window.optly.mrkt.form.createExp({formId: 'create-exp-form'});

$(createExpHelperInst.formElm).on('submit', function(e) {
  var uri,
    validationError = false;

  e.preventDefault();

  validationError = createExpHelperInst.validateInputs();

  if(!validationError) {

    createExpHelperInst.processingAdd();

    uri = createExpHelperInst.getUri();

    w.analytics.track('create experiment submit', {
      category: 'experiment',
      label: w.location.pathname
    }, {
      integrations: {
        Marketo: false
      }
    });

    w.setTimeout(function() {
      window.location.href = uri;
    }, 500);

  } else {
    createExpHelperInst.showOptionsError();
  }


});

var createExpHelperInst = window.optly.mrkt.form.createExp({formId: 'create-exp-form'});

$(createExpHelperInst.formElm).on('submit', function(e) {
  var uri,
    validationError = false;

  e.preventDefault();

  validationError = createExpHelperInst.validateInputs();

  if(!validationError) {

    createExpHelperInst.processingAdd();

    uri = createExpHelperInst.getUri();

    w.analytics.track('create experiment submit', {
      category: 'experiment',
      label: w.location.pathname
    });

    w.setTimeout(function() {
      window.location.href = uri;
    }, 500);

  } else {
    createExpHelperInst.showOptionsError();
  }


});

Send create experiment submit to Marketo.
Send create experiment submit to Marketo.
