title: How to pass parameter after form submit in Clickfunnel?
body: <p>I am trying to track sales from different traffic sources. I have multiple sources of traffic sending clicks to my Clickfunnel landing page. I have attached utm_term parameters to the links from different traffic sources.</p>
  
  <p>So the utm_term parameter is now on the landing page (1st page of my funnel), but after I optin and submit form to move to the second page, the parameter is gone.</p>
  
  <p>How can I store the parameter somewhere and pass it along down the funnel (2nd, 3rd, 4th and 5th page)?</p>
  
  <p>Ultimately, I need to pass that parameter into a button href on the 2nd page.</p>
  
  <p>--</p>
  
  <p>Edit: I'm using this script from <a href="https://devquickie.com/2018/03/20/add-utm-tags-to-all-page-links-and-buttons-in-clickfunnels/" rel="nofollow noreferrer">DevQuickie</a> to insert the utm_term into buttons:</p>
  
  <pre><code>&lt;script type="text/javascript" src="https://cdn.rawgit.com/devQuickie/queryparams-to-a/f702ad7c/script.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>But I need to find out how to capture the parameter and pass it after submitting a form.</p>
  
  <p>Alternatively, I think the <a href="https://whiskeyneat.com/how-to-forward-url-parameters-in-clickfunnels-pages" rel="nofollow noreferrer">concept of this</a> works but it doesn't seem to work with "button actions" in Clickfunnel:</p>
  
  <pre><code>&lt;script&gt;
  function getParameterByName(name, url) {
      if (!url) url = window.location.href;
      name = name.replace(/[\[\]]/g, "\\$&amp;");
      var regex = new RegExp("[?&amp;]" + name + "(=([^&amp;#]*)|&amp;|#|$)"),
          results = regex.exec(url);
      if (!results) return null;
      if (!results[2]) return '';
      return decodeURIComponent(results[2].replace(/\+/g, " "));
  }
  var newParam = getParameterByName('parameter')
  var nextURL3 = ('https://www.yourdomain.com/pagepath\?parameter\=' + newParam);
  &lt;/script&gt;
  </code></pre>
  
  <p>Button code:</p>
  
  <pre><code>&lt;div class="de elBTN elAlign_center elMargin0 ui-droppable de-editable" id="tmp_button-86409" data-de-type="button" data-de-editing="false" data-title="button" data-ce="false" data-trigger="none" data-animate="fade" data-delay="500" style="margin-top: 30px; outline: none; cursor: pointer; display: block;" aria-disabled="false" data-elbuttontype="1"&gt;
  &lt;a onclick="location.href=nextURL3;" class="elButton elButtonSize1 elButtonColor1 elButtonRounded elButtonPadding2 elBtnVP_10 elButtonCorner3 elBtnHP_25 elBTN_b_1 elButtonShadowN1 elButtonTxtColor1 elButtonFull" style="color: rgb(255, 255, 255); font-weight: 600; background-color: rgb(1, 116, 199); font-size: 26px;"&gt;
  &lt;span class="elButtonMain"&gt;&lt;i class="fa_prepended fa fa-angle-double-right"&gt;&lt;/i&gt;Button Text Goes Here&lt;i class="fa_appended fa fa-angle-double-left"&gt;&lt;/i&gt;&lt;/span&gt;
  &lt;span class="elButtonSub"&gt;&lt;/span&gt;
  &lt;/a&gt;
  &lt;/div&gt;
  </code></pre>