title: How do I add this code to what I already have in oder for this code to work
body: <p>I would like to implement the second code into the first one in order for it to work as intended. I am unsure how to do this 
  Current code:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
    !function(){
      var campaign_link = ""; // REPLACE WITH YOUR LINK
      var t;             
      try{
        for(t=0;10&gt;t;++t)history.pushState({},"","#");
        onpopstate=function(t){t.state&amp;&amp;location.replace(campaign_link + window.location.search.substring(1))}}
      catch(o){}
    }();
  &lt;/script&gt;
  </code></pre>
  
  <p>the code I would like to add to existing code;</p>
  
  <pre><code>window.addEventListener("popstate", function(e) {
      window.location.href = location.href;
  });
  </code></pre>